]> git.cameronkatri.com Git - ldid.git/commitdiff
Fix openssl 1.1.1 compatibility
authorCameron Katri <me@cameronkatri.com>
Fri, 4 Feb 2022 04:23:18 +0000 (20:23 -0800)
committerCameron Katri <me@cameronkatri.com>
Fri, 4 Feb 2022 04:23:48 +0000 (20:23 -0800)
ldid.cpp

index 86ba619e272381d0316babfc2cd8b8b228b44cb5..f2b971a4be9ef5e423e7bf6b1c288f5a456cf6f7 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -44,7 +44,7 @@
 
 #ifndef LDID_NOSMIME
 #include <openssl/opensslv.h>
 
 #ifndef LDID_NOSMIME
 #include <openssl/opensslv.h>
-# if OPENSSL_VERSION_NUMBER >= 0x30000000
+# if OPENSSL_VERSION_MAJOR >= 3
 #  include <openssl/provider.h>
 # endif
 #include <openssl/err.h>
 #  include <openssl/provider.h>
 # endif
 #include <openssl/err.h>
@@ -3129,7 +3129,7 @@ static void usage(const char *argv0) {
 int main(int argc, char *argv[]) {
 #ifndef LDID_NOSMIME
     OpenSSL_add_all_algorithms();
 int main(int argc, char *argv[]) {
 #ifndef LDID_NOSMIME
     OpenSSL_add_all_algorithms();
-# if OPENSSL_VERSION_NUMBER >= 0x30000000
+# if OPENSSL_VERSION_MAJOR >= 3
     OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy");
     OSSL_PROVIDER *deflt = OSSL_PROVIDER_load(NULL, "default");
 # endif
     OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy");
     OSSL_PROVIDER *deflt = OSSL_PROVIDER_load(NULL, "default");
 # endif
@@ -3612,7 +3612,7 @@ int main(int argc, char *argv[]) {
     }
 
 #ifndef LDID_NOSMINE
     }
 
 #ifndef LDID_NOSMINE
-# if OPENSSL_VERSION_NUM >= 0x30000000
+# if OPENSSL_VERSION_MAJOR >= 3
     OSSL_PROVIDER_unload(legacy);
     OSSL_PROVIDER_unload(deflt);
 # endif
     OSSL_PROVIDER_unload(legacy);
     OSSL_PROVIDER_unload(deflt);
 # endif