crypto/evp/e_aes_cbc_hmac_sha[1|256].c: fix compiler warnings.
[openssl.git] / crypto / evp / pmeth_lib.c
index 9820f69b04905dfe941b2e546571cf0427505cef..c64f907fdac037fa5e2ac4aaef150bead72b071d 100644 (file)
@@ -74,6 +74,7 @@ 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, cmac_pkey_meth;
+extern const EVP_PKEY_METHOD dhx_pkey_meth;
 
 static const EVP_PKEY_METHOD *standard_methods[] =
        {
@@ -90,7 +91,10 @@ static const EVP_PKEY_METHOD *standard_methods[] =
        &ec_pkey_meth,
 #endif
        &hmac_pkey_meth,
-       &cmac_pkey_meth
+       &cmac_pkey_meth,
+#ifndef OPENSSL_NO_DH
+       &dhx_pkey_meth
+#endif
        };
 
 DECLARE_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_METHOD *, const EVP_PKEY_METHOD *,
@@ -204,6 +208,8 @@ EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags)
        if (!pmeth)
                return NULL;
 
+       memset(pmeth, 0, sizeof(EVP_PKEY_METHOD));
+
        pmeth->pkey_id = id;
        pmeth->flags = flags | EVP_PKEY_FLAG_DYNAMIC;