Repository navigation
Conversation
… default (#15) (task_15) [issue_15] - cmake/BuildOpenSSL.cmake: the default EASYSSL_OPENSSL_TAG is now openssl-4.0.3 (the latest stable OpenSSL 4.x release). The no-ssl3 and no-engine options are only passed for the OpenSSL 3.x tags: in the OpenSSL 4.0 releases the SSLv3 protocol and the legacy ENGINE interface were removed and the options are deprecated no-ops. All the configure targets, the build_libs/install_sw make targets and the other options were verified against the openssl-4.0.3 sources. - CMakeLists.txt: the BUILD_WITH_OPENSSL option is enabled by default (the OpenSSL library is self-built with the project), per the maintainer request. - src/lib/src/public/easyssl/x509.cpp: the X509_get_subject_name method returns a const X509_NAME* in the OpenSSL 4.x releases, so the subject name of the self-signed certificate is now filled with a separate X509_NAME object that is set with the X509_set_subject_name/X509_set_issuer_name methods. The fix is compatible with the OpenSSL 3.x releases too. - README.md, docs/USAGE.md: the updated build options description (the new default tag, the new BUILD_WITH_OPENSSL default, the OpenSSL 3.x/4.x support).
EndrII
approved these changes
Oct 12, 2026
…sl library When the static OpenSSL libraries (the self-built OpenSSL or the EASYSSL_STATIC_SSL option) are linked into the shared easyssl library, the linker exports all the OpenSSL symbols (public API and internal functions) from the shared library by default. This breaks the coexistence with another OpenSSL in the same process (for example, the system OpenSSL that the Qt TLS backend plugin uses): the dynamic linker resolves the OpenSSL symbols of the other library to the embedded copies inside the easyssl library (symbol interposition) and the mixed OpenSSL versions corrupt the internal OpenSSL data structures at runtime (SIGSEGV in the certificate tests on the Linux CI). The --exclude-libs,ALL linker option keeps the symbols of the static archives out of the dynamic symbol table of the shared library. The easyssl public API is not affected, because it is compiled into the shared library objects and not into the static archives. The option is only added for the shared builds on the ELF platforms with the GNU or the LLVM linkers (Linux, Windows (MinGW), Android and iOS); it is not needed for the MSVC and the Apple platforms.
Closed
Member
Author
|
CI update: the earlier Build and Test failure (run on a7d6a3c, SIGSEGV in crtTestX509RSA on Linux) was caused by symbol interposition: the shared libeasyssl exported the embedded self-built OpenSSL 4.0.3, which the Qt TLS plugin (linked against the system OpenSSL 3.0.13) resolved to at runtime, mixing versions and corrupting OpenSSL state. Fixed in d3ecf93 by linking the embedded static OpenSSL archives with --exclude-libs,ALL on ELF platforms. CI (Linux + Windows, Release) is green on the latest commit (d3ecf93). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #15 (OpenSSL 4.x support).
cmake/BuildOpenSSL.cmake— the defaultEASYSSL_OPENSSL_TAGis nowopenssl-4.0.3(the latest stable OpenSSL 4.x release; 4.1.0 is still beta). Theno-ssl3andno-engineoptions are only passed for the OpenSSL 3.x tags: in the OpenSSL 4.0 releases the SSLv3 protocol and the legacy ENGINE interface were removed, and the OpenSSL Configure script reports these options as deprecated no-ops. All the configure targets (linux-x86_64,linux-aarch64,mingw64,darwin64-*-cc,android-*,ios*-cross), thebuild_libs/install_swmake targets and the remaining options (no-shared,no-tests,no-ui-console,no-comp,--libdir) were verified against theopenssl-4.0.3sources.CMakeLists.txt— theBUILD_WITH_OPENSSLoption is enabled by default (per the maintainer comment on the issue): the OpenSSL library is self-built with the project, so the application has no runtime dependency on the system OpenSSL. Set-DBUILD_WITH_OPENSSL=0to use the system OpenSSL 3.0+ library instead.src/lib/src/public/easyssl/x509.cpp— the only code incompatibility found by the build: theX509_get_subject_namemethod returns aconst X509_NAME *in the OpenSSL 4.x releases, so the subject name of the self-signed certificate can not be changed in place anymore. The name is now filled with a separateX509_NAMEobject that is set with theX509_set_subject_name/X509_set_issuer_namemethods (both copy the name) and freed afterwards. The fix is compatible with the OpenSSL 3.x releases too.README.md,docs/USAGE.md— the updated build options description (the new default tag, the newBUILD_WITH_OPENSSLdefault, the OpenSSL 3.x/4.x support).The easyssl sources use only the EVP/X509 high level OpenSSL API, so no other code changes were required for the 4.x releases. The
find_package(OpenSSL 3.0.0...<5.0.0 REQUIRED)call (used whenBUILD_WITH_OPENSSL=0) already accepted the 4.x releases.Verification
Local build with Qt 6.12 + Ninja (self-built OpenSSL 4.0.3, the new default):
lddand the version string in the builtlibcrypto.a; the system OpenSSL 3.0.13 is not used),Totals: 7 passed, 0 failed, 0 skipped, 0 blacklisted(RSA/ECDSA crypto, async auth and the X509 certificate tests),-DEASYSSL_OPENSSL_TAG=openssl-3.0.9generates the OpenSSL build with theno-ssl3/no-engineoptions.The CI builds the project with
-DBUILD_WITH_OPENSSL=ONon Linux and Windows, so this PR exercises the new OpenSSL 4.0.3 default end to end.