Revert "EVP_PKEY_asn1_add0(): Check that this method isn't already registered"
authorRichard Levitte <levitte@openssl.org>
Mon, 22 Jan 2018 17:24:55 +0000 (18:24 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 23 Jan 2018 19:27:32 +0000 (20:27 +0100)
This reverts commit d85722d31ac9ff0dc54c06cdc8d125acf56ca27a.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5137)

crypto/asn1/ameth_lib.c

index 5662e176883c24aa9f66934b17c976815198887d..a40e20ed3322f5873ddd2de6d2bd584c71c3477d 100644 (file)
@@ -137,11 +137,6 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
 
 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth)
 {
-    if (pkey_asn1_find(ameth->pkey_id) != NULL) {
-        EVPerr(EVP_F_EVP_PKEY_ASN1_ADD0,
-               EVP_R_PKEY_ASN1_METHOD_ALREADY_REGISTERED);
-        return 0;
-    }
     if (app_methods == NULL) {
         app_methods = sk_EVP_PKEY_ASN1_METHOD_new(ameth_cmp);
         if (app_methods == NULL)