From 1531241c54b36be74967753cdea78c16831f7aa5 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 6 Apr 2020 18:21:50 +0100 Subject: Teach PEM_read_bio_PrivateKey about libctx Now that d2i_PrivateKey_ex() and other similar functions exist we should use it when loading a PEM PrivateKey. Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/11494) --- include/openssl/pem.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/openssl/pem.h b/include/openssl/pem.h index e48d247087..b811d5ea91 100644 --- a/include/openssl/pem.h +++ b/include/openssl/pem.h @@ -347,6 +347,14 @@ DECLARE_PEM_rw(DHparams, DH) DECLARE_PEM_write(DHxparams, DH) # endif DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) +EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, + void *u, OPENSSL_CTX *libctx, + const char *propq); +# ifndef OPENSSL_NO_STDIO +EVP_PKEY *PEM_read_PrivateKey_ex(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, + void *u, OPENSSL_CTX *libctx, + const char *propq); +# endif DECLARE_PEM_rw(PUBKEY, EVP_PKEY) int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x, -- cgit v1.2.3