Engine EC_KEY_METHOD functionality.
[openssl.git] / crypto / engine / eng_fat.c
index 7984a5bf21a90c2847fada809f5227ce62818584..79d30bc8f529fa6a501bd156715e8c6330bdcf70 100644 (file)
@@ -80,6 +80,8 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags)
         return 0;
 #endif
 #ifndef OPENSSL_NO_EC
+    if ((flags & ENGINE_METHOD_EC) && !ENGINE_set_default_EC(e))
+        return 0;
 #endif
     if ((flags & ENGINE_METHOD_RAND) && !ENGINE_set_default_RAND(e))
         return 0;
@@ -107,6 +109,8 @@ static int int_def_cb(const char *alg, int len, void *arg)
         *pflags |= ENGINE_METHOD_DSA;
     else if (strncmp(alg, "DH", len) == 0)
         *pflags |= ENGINE_METHOD_DH;
+    else if (strncmp(alg, "EC", len) == 0)
+        *pflags |= ENGINE_METHOD_EC;
     else if (strncmp(alg, "RAND", len) == 0)
         *pflags |= ENGINE_METHOD_RAND;
     else if (strncmp(alg, "CIPHERS", len) == 0)
@@ -150,6 +154,7 @@ int ENGINE_register_complete(ENGINE *e)
     ENGINE_register_DH(e);
 #endif
 #ifndef OPENSSL_NO_EC
+    ENGINE_register_EC(e);
 #endif
     ENGINE_register_RAND(e);
     ENGINE_register_pkey_meths(e);