STACK_OF(EVP_PKEY_METHOD) *app_pkey_methods = NULL;
extern const EVP_PKEY_METHOD rsa_pkey_meth, dh_pkey_meth, dsa_pkey_meth;
-extern const EVP_PKEY_METHOD ec_pkey_meth, hmac_pkey_meth;
+extern const EVP_PKEY_METHOD ec_pkey_meth, hmac_pkey_meth, cmac_pkey_meth;
static const EVP_PKEY_METHOD *standard_methods[] =
{
+#ifndef OPENSSL_NO_RSA
&rsa_pkey_meth,
+#endif
+#ifndef OPENSSL_NO_DH
&dh_pkey_meth,
+#endif
+#ifndef OPENSSL_NO_DSA
&dsa_pkey_meth,
+#endif
+#ifndef OPENSSL_NO_EC
&ec_pkey_meth,
+#endif
&hmac_pkey_meth,
+ &cmac_pkey_meth
};
DECLARE_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_METHOD *, const EVP_PKEY_METHOD *,
return NULL;
id = pkey->ameth->pkey_id;
}
+#ifndef OPENSSL_NO_ENGINE
/* Try to find an ENGINE which implements this method */
if (e)
{
if (e)
pmeth = ENGINE_get_pkey_meth(e, id);
else
+#endif
pmeth = EVP_PKEY_meth_find(id);
if (pmeth == NULL)
ret = OPENSSL_malloc(sizeof(EVP_PKEY_CTX));
if (!ret)
{
+#ifndef OPENSSL_NO_ENGINE
if (e)
ENGINE_finish(e);
+#endif
EVPerr(EVP_F_INT_CTX_NEW,ERR_R_MALLOC_FAILURE);
return NULL;
}
ret->operation = EVP_PKEY_OP_UNDEFINED;
ret->pkey = pkey;
ret->peerkey = NULL;
+ ret->pkey_gencb = 0;
if (pkey)
CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);
ret->data = NULL;