From b0004708730f300a2e5c6a11c887caab50b6c42a Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 1 Nov 2017 00:45:24 +0800 Subject: Support public key and param check in EVP interface EVP_PKEY_public_check() and EVP_PKEY_param_check() Doc and test cases are added Reviewed-by: Tim Hudson Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/4647) --- crypto/asn1/ameth_lib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crypto/asn1/ameth_lib.c') diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index 87a3eba14a..5662e17688 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -382,3 +382,15 @@ void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, { ameth->pkey_check = pkey_check; } + +void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, + int (*pkey_pub_check) (const EVP_PKEY *pk)) +{ + ameth->pkey_public_check = pkey_pub_check; +} + +void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, + int (*pkey_param_check) (const EVP_PKEY *pk)) +{ + ameth->pkey_param_check = pkey_param_check; +} -- cgit v1.2.3