]> git.cameronkatri.com Git - ldid.git/commitdiff
ossl3 compat
authorsunflsks <22717474+sunflsks@users.noreply.github.com>
Thu, 7 Oct 2021 16:11:42 +0000 (11:11 -0500)
committerCameron Katri <me@cameronkatri.com>
Sun, 10 Oct 2021 22:35:20 +0000 (18:35 -0400)
ldid.cpp

index c65cb96b6887da614af75dab7025e7f15cbf2b01..c2f7e0a7a66b5d67bf3380a737623b257dd3e16a 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -43,6 +43,7 @@
 #include <sys/types.h>
 
 #ifndef LDID_NOSMIME
+#include <openssl/provider.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/pkcs7.h>
@@ -3100,6 +3101,8 @@ static void usage(const char *argv0) {
 int main(int argc, char *argv[]) {
 #ifndef LDID_NOSMIME
     OpenSSL_add_all_algorithms();
+    OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy");
+    OSSL_PROVIDER *deflt = OSSL_PROVIDER_load(NULL, "default");
 #endif
 
     union {
@@ -3574,6 +3577,11 @@ int main(int argc, char *argv[]) {
         ++filei;
     }
 
+#ifndef LDID_NOSMINE
+    OSSL_PROVIDER_unload(legacy);
+    OSSL_PROVIDER_unload(deflt);
+#endif
+
     return filee;
 }
 #endif