CRYPTO: Remove the check for built-in methods in the export_to function
[openssl.git] / crypto / ec / ec_ameth.c
index c7fbaeab5e9ee216ca073c8b3affe408c3770b22..9ca023bbe3afd7e2835b5b5dc4c9d264a93f7ca4 100644 (file)
@@ -498,13 +498,6 @@ int ec_pkey_export_to(const EVP_PKEY *from, void *to_keydata,
             || (ecg = EC_KEY_get0_group(eckey)) == NULL)
         return 0;
 
-    /*
-     * If the EC_KEY method is foreign, then we can't be sure of anything,
-     * and can therefore not export or pretend to export.
-     */
-    if (EC_KEY_get_method(eckey) != EC_KEY_OpenSSL())
-        return 0;
-
     tmpl = OSSL_PARAM_BLD_new();
     if (tmpl == NULL)
         return 0;