]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only include custom OpenSSL ABI checks for OpenSSL 1.1
authorkpcyrd <git@rxv.cc>
Wed, 7 Aug 2024 11:50:58 +0000 (13:50 +0200)
committerkpcyrd <git@rxv.cc>
Wed, 7 Aug 2024 11:50:58 +0000 (13:50 +0200)
OpenSSL has a [Policy on API compatibility in minor releases][1] saying:

[1]: https://openssl-library.org/policies/technical/api-compat/

> Only API additions are allowed in minor releases.

Minor releases are defined as 3.X.0. A change to 4.X.X would change the
libssl.so.3 SONAME to libssl.so.4 so the (possibly) incompatible library would
not get loaded in the first place.

This warning message is causing confusion between unrelated issues in the Arch
Linux bug tracker.

src/lib/crypt_ops/crypto_openssl_mgt.c

index ca12a825185cbdb2de3d75877810c7a3029e9c15..39d1de91040cd28a676534c3e6ab2add3f11c91f 100644 (file)
@@ -227,6 +227,7 @@ crypto_openssl_early_init(void)
 
     setup_openssl_threading();
 
+#ifdef OPENSSL_1_1_API
     unsigned long version_num = tor_OpenSSL_version_num();
     const char *version_str = crypto_openssl_get_version_str();
     if (version_num == OPENSSL_VERSION_NUMBER &&
@@ -248,6 +249,7 @@ crypto_openssl_early_init(void)
                (unsigned long)OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT,
                version_num, version_str);
     }
+#endif /* defined(OPENSSL_1_1_API) */
 
     crypto_force_rand_ssleay();
 }