diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-06-07 11:54:04 +0200 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-08 22:01:34 +1000 |
commit | 92b835376a81ed310c9b365094ba670bc231f64c (patch) | |
tree | 7080552657604486248bab5e655675f3d2c8d37b /test/evp_extra_test.c | |
parent | 907720f0644bf6b7ad4fa94f03ac29402ae597ab (diff) | |
download | openssl-new-92b835376a81ed310c9b365094ba670bc231f64c.tar.gz |
EVP_PKEY_new_raw_private_key: Allow zero length keys
Allocate at least one byte to distinguish a zero length key
from an unset key.
Fixes #15632
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15643)
Diffstat (limited to 'test/evp_extra_test.c')
-rw-r--r-- | test/evp_extra_test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index 61f6b4ce00..33bb698ff3 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -1681,6 +1681,9 @@ static struct keys_st { } keys[] = { { EVP_PKEY_HMAC, "0123456789", NULL + }, + { + EVP_PKEY_HMAC, "", NULL #ifndef OPENSSL_NO_POLY1305 }, { EVP_PKEY_POLY1305, "01234567890123456789012345678901", NULL |