Solved QSslCertificate::importPkcs12() not implemented on macosx
-
To add to @jsulm, there's also no need to rebuild all of Qt, qtbase will be enough for your test.
-
@SGaist, yes, I had download the qtbase directory, It seems the QSslCertificate::importPkcs12 method is implemented in the QtNetwork.framework, I will the change qsslsocket_mac.cpp file in the '~/Desktop/qt5/qtbase/src/network/ssl/' use the patch, after I fixed the code in network sub directory , how to build the qtbase directory to get the QtNetwork.framework? there is a network.pro file in the network sub directory , can I use QtCreator IDE open it to build and get the QtNetwork.framework?
-
I always build the full qtbase module when testing such changes.
-
@SGaist I must use the 5.6.1 qt framework because the history reason, so in my project, I use the QtNetwork.framework which version is 5.6.1 when I use the QSslCertificate::importPkcs12 method, it shows me error 'Unimplemented code.' I had read the document 'Qt for macOS - Building from Source' https://doc.qt.io/qt-5/macos-building.html and can build the QtNetwork.framework which version is 5.6.1 on my mac successfully as I expect;
I see the patch on https://codereview.qt-project.org/#/c/199128/, it seems the patch only changes the 'src/network/ssl/qsslsocket_mac.cpp' file, so I use the qsslsocket_mac.cpp file in the patch instead of the qsslsocket_mac.cpp in the qt-everywhere-opensource-src-5.6.1 which I had download, when I rebuild qtbase in the the qt-everywhere-opensource-src-5.6.1 directory, it's show errors which tip me lack some method,
now I wonder whether the patch suitable for qt5.6.1 source code qt-everywhere-opensource-src-5.6.1?
how can I use the patch correct?
thanks a lot! -
@Princein said in QSslCertificate::importPkcs12() not implemented on macosx:
so I use the qsslsocket_mac.cpp file in the patch instead of the qsslsocket_mac.cpp in the qt-everywhere-opensource-src-5.6.1
What do you mean by that ? A patch is meant to be applied on a file, not replace it.
-
@SGaist, the patch has Dependencies source code
is that means I must check out the dev branch on the git://code.qt.io/qt/qt5.git or other right git repository, after that using the patch for the dev branch? and then rebuild the qtbase subdirectory to get the fixed QtNetwork.framework? -
@SGaist I had download the whole source code which includes the patch https://bugreports.qt.io/browse/QTBUG-56596 using 'git pull https://codereview.qt-project.org/qt/qtbase refs/changes/28/199128/11', and I build it successfully,I get the QtNetwork.framework after build,but the QtNetwork.framework which had the patch fix the bug version is 5.10.0, now in my qt project, the qt frameworks version is 5.6.1,can I change the QtNetwork.framework version from 5.10.0 to 5.6.1 by changing the source code config file? and how change the source code which includes the patch https://bugreports.qt.io/browse/QTBUG-56596 config file to generate 5.6.1 QtNetwork.framework? thanks a lot!
-
What you should do is get the 5.6.1 sources, and then apply the patch on top of the file of that version. You may have to do some adaptation by hand (maybe not)
Don't try to mix and match stuff.
-
@SGaist hahaha, I had solved this problem by changing the 5.6.1 version qtbase/network source code file by hand, thank you!
-
You're welcome !
Since you have it working now, pleas mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found.