Make EVP_PKEY_asn1_add0() stricter about its input
authorRichard Levitte <levitte@openssl.org>
Fri, 7 Dec 2018 08:26:04 +0000 (09:26 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 7 Dec 2018 10:57:04 +0000 (11:57 +0100)
commita86003162138031137727147c9b642d99db434b1
tree3d526a6efa5168dd80981ca3349df34586a24af7
parent95b7926bc3dfa6b649421b0cb6c9b497ddb1fad8
Make EVP_PKEY_asn1_add0() stricter about its input

It turns out that the strictness that was implemented in
EVP_PKEY_asn1_new() (see Github openssl/openssl#6880) was badly placed
for some usages, and that it's better to do this check only when the
method is getting registered.

Fixes #7758

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7847)
CHANGES
crypto/asn1/ameth_lib.c