]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/pem/pem_pkey.c
STORE: Deprecate legacy / ENGINE functions
[thirdparty/openssl.git] / crypto / pem / pem_pkey.c
index 8aee82ea80ba2ad1aa3c470a2749ed3569892a16..8b9bfe101ed31a4c5f915cafa0145516248ca627 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+/* We need to use some STORE deprecated APIs */
+#define OPENSSL_SUPPRESS_DEPRECATED
+
 #include <stdio.h>
 #include "internal/cryptlib.h"
 #include <openssl/buffer.h>
@@ -58,11 +61,13 @@ static EVP_PKEY *pem_read_bio_key(BIO *bp, EVP_PKEY **x,
                                  NULL, NULL)) == NULL)
         goto err;
 #ifndef OPENSSL_NO_SECURE_HEAP
-   if (try_secure) {
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+    if (try_secure) {
         int on = 1;
         if (!OSSL_STORE_ctrl(ctx, OSSL_STORE_C_USE_SECMEM, &on))
             goto err;
     }
+# endif
 #endif
 
     while (!OSSL_STORE_eof(ctx)