Support key check in EVP interface
authorPaul Yang <yang.yang@baishancloud.com>
Mon, 4 Sep 2017 14:02:59 +0000 (22:02 +0800)
committerRichard Levitte <levitte@openssl.org>
Wed, 13 Sep 2017 18:38:14 +0000 (20:38 +0200)
commit2aee35d37d5161a2efc4d57953a4a7b234b6ea4c
tree396369a86192ce41ecda126ad46fb0bbc8eae593
parentc061daaaed5ef05cd8cf0b8159d717be02fd451d
Support key check in EVP interface

A new method is added to EVP_PKEY_METH as:

    int (*check) (EVP_PKEY_CTX *ctx);

and to EVP_PKEY_ASN1_METHOD as:

    int (*pkey_check) (EVP_PKEY_CTX *ctx);

This is used to check the validity of a specific key.

The order of calls is:
EVP_PKEY_check -> pmeth.check -> ameth.pkey_check.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4337)
17 files changed:
apps/pkey.c
crypto/ec/ec_ameth.c
crypto/err/openssl.txt
crypto/evp/evp_err.c
crypto/evp/pmeth_gn.c
crypto/evp/pmeth_lib.c
crypto/include/internal/asn1_int.h
crypto/include/internal/evp_int.h
crypto/rsa/rsa_ameth.c
doc/man1/pkey.pod
doc/man3/EVP_PKEY_keygen.pod
doc/man3/EVP_PKEY_meth_new.pod
include/openssl/evp.h
include/openssl/evperr.h
test/build.info
test/evp_extra_test.c
util/libcrypto.num