diff options
author | Jon Spillett <jon.spillett@oracle.com> | 2021-05-18 13:37:35 +1000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-01 12:16:27 +0200 |
commit | 5e2d22d53ed322a7124e26a4fbd116a8210eb77a (patch) | |
tree | 8e78bfa8dfd5d923244f4e995d2de7ebbdccc089 /crypto | |
parent | e3c7595521c88579b9eaf02fc11025a2ecdb6ad5 (diff) |
Pass library context and property query into private key decoders
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14587)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/pem/pvkfmt.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c index d08fab4ba8..1ff68e2158 100644 --- a/crypto/pem/pvkfmt.c +++ b/crypto/pem/pvkfmt.c @@ -946,21 +946,33 @@ static void *do_PVK_key_bio(BIO *in, pem_password_cb *cb, void *u, } #ifndef OPENSSL_NO_DSA -DSA *b2i_DSA_PVK_bio(BIO *in, pem_password_cb *cb, void *u) +DSA *b2i_DSA_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u, + OSSL_LIB_CTX *libctx, const char *propq) { int isdss = 1; int ispub = 0; /* PVK keys are always private */ - return do_PVK_key_bio(in, cb, u, &isdss, &ispub, NULL, NULL); + return do_PVK_key_bio(in, cb, u, &isdss, &ispub, libctx, propq); +} + +DSA *b2i_DSA_PVK_bio(BIO *in, pem_password_cb *cb, void *u) +{ + return b2i_DSA_PVK_bio_ex(in, cb, u, NULL, NULL); } #endif -RSA *b2i_RSA_PVK_bio(BIO *in, pem_password_cb *cb, void *u) +RSA *b2i_RSA_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u, + OSSL_LIB_CTX *libctx, const char *propq) { int isdss = 0; int ispub = 0; /* PVK keys are always private */ - return do_PVK_key_bio(in, cb, u, &isdss, &ispub, NULL, NULL); + return do_PVK_key_bio(in, cb, u, &isdss, &ispub, libctx, propq); +} + +RSA *b2i_RSA_PVK_bio(BIO *in, pem_password_cb *cb, void *u) +{ + return b2i_RSA_PVK_bio_ex(in, cb, u, NULL, NULL); } EVP_PKEY *b2i_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u, |