aboutsummaryrefslogtreecommitdiff
path: root/crypto/evp/pmeth_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/pmeth_lib.c')
-rw-r--r--crypto/evp/pmeth_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index 7dbdb46..1ae22a7 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -95,6 +95,7 @@ const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type)
pmeth_fn *ret;
EVP_PKEY_METHOD tmp;
const EVP_PKEY_METHOD *t = &tmp;
+
tmp.pkey_id = type;
if (app_pkey_methods) {
int idx;
@@ -105,7 +106,7 @@ const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type)
ret = OBJ_bsearch_pmeth_func(&t, standard_methods,
sizeof(standard_methods) /
sizeof(pmeth_fn));
- if (!ret || !*ret)
+ if (ret == NULL || *ret == NULL)
return NULL;
return (**ret)();
}