PVK decoder: prompt for PVK passphrase and not PEM
authorTomas Mraz <tomas@openssl.org>
Thu, 2 Dec 2021 21:06:36 +0000 (22:06 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 6 Dec 2021 15:38:03 +0000 (16:38 +0100)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17181)

providers/implementations/encode_decode/decode_pvk2key.c

index 30b42d2097b3ae23de2bed9c27e107398f0ed293..32206fe84d9446f9160ff5394458ee938fd42ad7 100644 (file)
@@ -100,7 +100,7 @@ static int pvk2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection,
         if (!ossl_pw_set_ossl_passphrase_cb(&pwdata, pw_cb, pw_cbarg))
             goto end;
 
-        key = ctx->desc->read_private_key(in, ossl_pw_pem_password, &pwdata,
+        key = ctx->desc->read_private_key(in, ossl_pw_pvk_password, &pwdata,
                                           PROV_LIBCTX_OF(ctx->provctx), NULL);
 
         /*