ENGINE_pkey_asn1_find_str(): don't assume an engine implements ASN1 method
authorRichard Levitte <levitte@openssl.org>
Thu, 31 May 2018 09:12:34 +0000 (11:12 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 31 May 2018 10:03:20 +0000 (12:03 +0200)
commit5eb774324a14b03835020bb3ae2e1c6c92515db0
treee7c715d9081f26407fd9822962e241fa538622a1
parent5f49783c12e9e6100075e50fe727ee2d5cc30445
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
exist.

Fixes #6381

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6383)

(cherry picked from commit 1ac3cd6277f880fac4df313702d5e3b3814e56e2)
(cherry picked from commit 13b578ada3106a4ce9b836f167ee520539f5fa8f)
crypto/engine/tb_asnmth.c