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)
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index 61f6b4c..33bb698 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c
@@ -1681,6 +1681,9 @@ } keys[] = { { EVP_PKEY_HMAC, "0123456789", NULL + }, + { + EVP_PKEY_HMAC, "", NULL #ifndef OPENSSL_NO_POLY1305 }, { EVP_PKEY_POLY1305, "01234567890123456789012345678901", NULL