diff options
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/tb_asnmth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/engine/tb_asnmth.c b/crypto/engine/tb_asnmth.c index bc6e91ccab..ae99a37c3a 100644 --- a/crypto/engine/tb_asnmth.c +++ b/crypto/engine/tb_asnmth.c @@ -171,7 +171,8 @@ static void look_str_cb(int nid, STACK_OF(ENGINE) *sk, ENGINE *def, void *arg) ENGINE *e = sk_ENGINE_value(sk, i); EVP_PKEY_ASN1_METHOD *ameth; e->pkey_asn1_meths(e, &ameth, NULL, nid); - if (((int)strlen(ameth->pem_str) == lk->len) + if (ameth != NULL + && ((int)strlen(ameth->pem_str) == lk->len) && strncasecmp(ameth->pem_str, lk->str, lk->len) == 0) { lk->e = e; lk->ameth = ameth; |