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:59:11 +0000 (11:59 +0100)
commit673273c43e853188d6abcffaf76d0f432f13e8c6
treed22ac7c9c491f839bbe5a1899195a7c4b3941722
parentdeab38a4638bf0728bcdf4c161618818b5557573
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)

(cherry picked from commit a86003162138031137727147c9b642d99db434b1)
CHANGES
crypto/asn1/ameth_lib.c