aboutsummaryrefslogtreecommitdiffstats
path: root/ldid.cpp
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-10-11 13:45:40 -0400
committerCameron Katri <me@cameronkatri.com>2021-10-11 13:45:40 -0400
commit572d89dc95418fc4349641e3b3bb41b456409a87 (patch)
tree62148a123a2884705707439597d876b0eb291040 /ldid.cpp
parentfaedd62bfedc4369ea9d7847bdf657b22335a1fb (diff)
downloadldid-572d89dc95418fc4349641e3b3bb41b456409a87.tar.gz
ldid-572d89dc95418fc4349641e3b3bb41b456409a87.tar.zst
ldid-572d89dc95418fc4349641e3b3bb41b456409a87.zip
Fix < OpenSSL 3.0.0 build
Diffstat (limited to 'ldid.cpp')
-rw-r--r--ldid.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/ldid.cpp b/ldid.cpp
index f8360d3..08dcf55 100644
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -43,7 +43,10 @@
#include <sys/types.h>
#ifndef LDID_NOSMIME
+#include <openssl/opensslv.h>
+# if OPENSSL_VERSION_NUM >= 0x30000000
#include <openssl/provider.h>
+# endif
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/pkcs7.h>
@@ -3121,8 +3124,10 @@ static void usage(const char *argv0) {
int main(int argc, char *argv[]) {
#ifndef LDID_NOSMIME
OpenSSL_add_all_algorithms();
+# if OPENSSL_VERSION_NUM >= 0x30000000
OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy");
OSSL_PROVIDER *deflt = OSSL_PROVIDER_load(NULL, "default");
+# endif
#endif
union {
@@ -3602,8 +3607,10 @@ int main(int argc, char *argv[]) {
}
#ifndef LDID_NOSMINE
+# if OPENSSL_VERSION_NUM >= 0x30000000
OSSL_PROVIDER_unload(legacy);
OSSL_PROVIDER_unload(deflt);
+# endif
#endif
return filee;