]> git.ipfire.org Git - thirdparty/openssl.git/commit
Don't try the same decoder multiple times
authorMatt Caswell <matt@openssl.org>
Fri, 21 May 2021 11:21:32 +0000 (12:21 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 24 May 2021 08:39:27 +0000 (09:39 +0100)
commit669967fdd8e2174ed2b812df8488715c82f21360
treef2b2980b65ea0cd29e5ce0dbec5cdbb869929145
parent69d8cf70ef6496e0bc8fc5a27b068b4b4488d4a8
Don't try the same decoder multiple times

The function collect_decoder decides whether a given decoder should be
tried or not. It loops through all the names for matching keymgmts to
see if any are a match or not. If there is a match then the decoder gets
added. However, each keymgmt may have multiple aliases and a decoder was
being added for each one. For example DHX has 4 alias names, and therefore
4 instances of the DHX decoder were added and being tried.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15404)
crypto/encode_decode/decoder_pkey.c