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 11:00:29 +0000 (12:00 +0100)
commit7cbff94dff0b927e95be6fed991579ce8e98aa65
treeb657c89ef2cd2524fc8ed05f3dfe75a63315e9a4
parent403783ce05991e21a50d637398798a014e2c4f9d
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