From: Tomas Mraz Date: Thu, 2 Dec 2021 21:07:38 +0000 (+0100) Subject: key_to_type_specific_pem_bio_cb: Use passphrase callback from the arguments X-Git-Tag: openssl-3.0.1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13f0d76361b000ee8cfec0d08cb2a84bacf7fb8b;p=thirdparty%2Fopenssl.git key_to_type_specific_pem_bio_cb: Use passphrase callback from the arguments Reviewed-by: Tim Hudson Reviewed-by: Richard Levitte Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17181) (cherry picked from commit c22b6592135bfba95a315e438ac7bfc6db461407) --- diff --git a/providers/implementations/encode_decode/encode_key2any.c b/providers/implementations/encode_decode/encode_key2any.c index 91269be3a15..c7b01cb2b3e 100644 --- a/providers/implementations/encode_decode/encode_key2any.c +++ b/providers/implementations/encode_decode/encode_key2any.c @@ -401,7 +401,7 @@ static int key_to_type_specific_pem_bio_cb(BIO *out, const void *key, { return PEM_ASN1_write_bio(k2d, pemname, out, key, ctx->cipher, - NULL, 0, ossl_pw_pem_password, &ctx->pwdata) > 0; + NULL, 0, cb, cbarg) > 0; } static int key_to_type_specific_pem_priv_bio(BIO *out, const void *key,