wolfSSL 4.4.0 adds support for building Qt 5.12 and 5.13 against the wolfSSL embedded SSL/TLS library instead of the default OpenSSL backend! Using wolfSSL as a TLS provider in Qt can have many advantages, depending on application and industry. Some of these may include:
- Progressive TLS protocol support (up to TLS 1.3)
- Smaller footprint size (wolfSSL is up to 20 times smaller than OpenSSL)
- Extensive testing (wolfSSL is the best-tested SSL/TLS implementation available today)
- Certifications (FIPS 140-2, DO-178C)
- Portability (wolfSSL supports over 30 operating systems)
- Hardware cryptography support
- Commercial support
- Consulting services and training available
To compile wolfSSL for Qt, we have added a new configure option named “–enable-qt“. To compile Qt with the wolfSSL patch:
1. Follow the Building Qt Guide to download needed Qt dependencies and initialize the Qt repository.
2. Change directories into the qt5 directory and checkout a branch between 5.12-5.13.
$ cd qt5 $ git checkout [branch_name]
3. Apply the wolfSSL Qt patch file to qt5.
$ cd qt5/qtbase $ patch -p1 < /path/to/wolfssl_qt_src.patch
4. Link to wolfSSL directly by setting the WOLFSSL_LIBS variable.
$ export WOLFSSL_LIBS="-L/path/to/wolf-install/lib -lwolfssl"
5. Configure Qt using the “-wolfssl-linked” option, and add wolfSSL header directories to the include path.
$ ./configure -wolfssl-linked -I/path/to/wolf-install/include/wolfssl -I/path/to/wolf-install/include
6. Build Qt.
$ make
7. Test the build.
$ make test
8. Or, run tests individually:
$ qtbase/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate $ qtbase/tests/auto/network/ssl/qasn1element/tst_qasn1element $ qtbase/tests/auto/network/ssl/qpassworddigestor/tst_qpassworddigestor $ qtbase/tests/auto/network/ssl/qsslcipher/tst_qsslcipher $ qtbase/tests/auto/network/ssl/qssldiffiehellmanparameters/tst_qssldiffiehellmanparameters $ qtbase/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve $ qtbase/tests/auto/network/ssl/qsslerror/tst_qsslerror $ qtbase/tests/auto/network/ssl/qsslkey/tst_qsslkey $ qtbase/tests/auto/network/ssl/qsslsocket/tst_qsslsocket $ qtbase/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member $ qtbase/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static
wolfSSL’s port into Qt has not been merged upstream yet, and is currently distributed in patch form.
If you have any questions or run into any issues, contact us at facts@wolfssl.com, or call us at +1 425 245 8247.