[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Richard Levitte levitte at openssl.org
Thu May 31 10:00:31 UTC 2018

The branch OpenSSL_1_0_2-stable has been updated
       via  1ac3cd6277f880fac4df313702d5e3b3814e56e2 (commit)
      from  af21f71e7c59474271f0c24d58f212fad4032e3a (commit)

- Log -----------------------------------------------------------------
commit 1ac3cd6277f880fac4df313702d5e3b3814e56e2
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu May 31 11:12:34 2018 +0200

    ENGINE_pkey_asn1_find_str(): don't assume an engine implements ASN1 method
    Just because an engine implements algorithm methods, that doesn't mean
    it also implements the ASN1 method.  Therefore, be careful when looking
    for an ASN1 method among all engines, don't try to use one that doesn't
    Fixes #6381
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/6383)


Summary of changes:
 crypto/engine/tb_asnmth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/engine/tb_asnmth.c b/crypto/engine/tb_asnmth.c
index a1a9b88..59e4ebf 100644
--- a/crypto/engine/tb_asnmth.c
+++ b/crypto/engine/tb_asnmth.c
@@ -215,7 +215,7 @@ 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)) {
             lk->e = e;
             lk->ameth = ameth;

More information about the openssl-commits mailing list