diff options
author | Matt Caswell <matt@openssl.org> | 2021-06-07 14:54:24 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-06-08 18:53:39 +0100 |
commit | 4bf696c1d05d19ad495995309981f91f265cdaf2 (patch) | |
tree | 284ca9a876ea6b48a80f3e10f45969c7e1c86002 /test | |
parent | 1df8322ce0b54d171dea1a364a3c78a8a4980f65 (diff) | |
download | openssl-new-4bf696c1d05d19ad495995309981f91f265cdaf2.tar.gz |
Correctly detect decode errors when checking if a key is supported
If we have an unsupported key type we may get a decode error and
therefore we should detect that.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15504)
Diffstat (limited to 'test')
-rw-r--r-- | test/evp_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/evp_test.c b/test/evp_test.c index 059de1251f..6ba72b405b 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -3348,6 +3348,7 @@ static int key_unsupported(void) long reason = ERR_GET_REASON(err); if ((lib == ERR_LIB_EVP && reason == EVP_R_UNSUPPORTED_ALGORITHM) + || (lib == ERR_LIB_EVP && reason == EVP_R_DECODE_ERROR) || reason == ERR_R_UNSUPPORTED) { ERR_clear_error(); return 1; |