summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-04-06 18:18:18 +0100
committerMatt Caswell <matt@openssl.org>2020-04-15 11:24:13 +0100
commit472a88b79e779342adc3b85b5bea318de038ae14 (patch)
tree8a9a0eda32d60f98732f119c8f2f603576d2ea31 /include/crypto
parentca59b00bbd701b9e5e7ce213f44a4d7577d6d2db (diff)
Teach d2i_PrivateKey et al about libctx
The Ed448 private key decoding makes algorithm fetches. Therefore we teach d2i_PrivateKey et al about libctx and make sure it is passed through the layers. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11494)
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/asn1.h5
-rw-r--r--include/crypto/evp.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h
index 84e6e7f544..737c715e33 100644
--- a/include/crypto/asn1.h
+++ b/include/crypto/asn1.h
@@ -76,6 +76,11 @@ struct evp_pkey_asn1_method_st {
EVP_KEYMGMT *to_keymgmt, OPENSSL_CTX *libctx,
const char *propq);
OSSL_CALLBACK *import_from;
+
+ int (*priv_decode_with_libctx) (EVP_PKEY *pk,
+ const PKCS8_PRIV_KEY_INFO *p8inf,
+ OPENSSL_CTX *libctx,
+ const char *propq);
} /* EVP_PKEY_ASN1_METHOD */ ;
DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD)
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index 38adbd0c82..3f9cc9c683 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -736,4 +736,7 @@ const EVP_MD *evp_get_digestbyname_ex(OPENSSL_CTX *libctx, const char *name);
*/
int evp_pkey_ctx_set_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
int evp_pkey_ctx_get_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
+
+EVP_PKEY *evp_pkcs82pkey_int(const PKCS8_PRIV_KEY_INFO *p8, OPENSSL_CTX *libctx,
+ const char *propq);
#endif /* !defined(FIPS_MODE) */