From e8f9f08f17e4f15ee737115d336d110dc8dea0ec Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 9 Mar 2018 11:02:28 +0000 Subject: Add functions for setting the new EVP_PKEY_ASN1_METHOD functions Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5520) --- crypto/asn1/ameth_lib.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crypto/asn1/ameth_lib.c') diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index f8171986f0..b5f0293fc0 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -400,3 +400,20 @@ void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, { ameth->pkey_param_check = pkey_param_check; } + +void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*set_priv_key) (EVP_PKEY *pk, + const unsigned char + *priv, + size_t len)) +{ + ameth->set_priv_key = set_priv_key; +} + +void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*set_pub_key) (EVP_PKEY *pk, + const unsigned char *pub, + size_t len)) +{ + ameth->set_pub_key = set_pub_key; +} -- cgit v1.2.3