summaryrefslogtreecommitdiffstats
path: root/providers/implementations/encode_decode/decode_der2key.c
diff options
context:
space:
mode:
Diffstat (limited to 'providers/implementations/encode_decode/decode_der2key.c')
-rw-r--r--providers/implementations/encode_decode/decode_der2key.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/providers/implementations/encode_decode/decode_der2key.c b/providers/implementations/encode_decode/decode_der2key.c
index 4018d2021b..466a73f908 100644
--- a/providers/implementations/encode_decode/decode_der2key.c
+++ b/providers/implementations/encode_decode/decode_der2key.c
@@ -28,6 +28,7 @@
#include "crypto/dh.h"
#include "crypto/dsa.h"
#include "crypto/ec.h"
+#include "crypto/evp.h"
#include "crypto/ecx.h"
#include "crypto/rsa.h"
#include "prov/bio.h"
@@ -321,8 +322,8 @@ static int der2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection,
if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
derp = der;
- pkey = d2i_PrivateKey_ex(ctx->desc->evp_type, NULL, &derp, der_len,
- libctx, NULL);
+ pkey = evp_privatekey_from_binary(ctx->desc->evp_type, NULL,
+ &derp, der_len, libctx, NULL);
}
if (pkey == NULL