summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-02-01 08:58:58 +0100
committerRichard Levitte <levitte@openssl.org>2021-02-24 19:50:10 +0100
commita8eb71ad577bbbd41cea915315451f0ef9f11581 (patch)
tree8d66d4332f9fc4099c4c8b8a343600996ad7fc3b /test
parentda9988e0f5371cb7e2aeed9f3c9a6433a9acc595 (diff)
Allow the sshkdf type to be passed as a single character
This partially reverts commit 270a5ce1d9ea579a2f1d45887971582b1ef2b6a1. This also slightly modifies the way diverse parameters in are specified in providers/fips/self_test_data.inc for better consistency. Fixes #14027 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14035)
Diffstat (limited to 'test')
-rw-r--r--test/evp_kdf_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/evp_kdf_test.c b/test/evp_kdf_test.c
index cb387bc71d..a1a2fadcce 100644
--- a/test/evp_kdf_test.c
+++ b/test/evp_kdf_test.c
@@ -1205,7 +1205,7 @@ static int test_kdf_sshkdf(void)
int ret;
EVP_KDF_CTX *kctx;
OSSL_PARAM params[6], *p = params;
- char kdftype[] = EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV;
+ char kdftype = EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV;
unsigned char out[8];
/* Test data from NIST CAVS 14.1 test vectors */
static unsigned char key[] = {
@@ -1245,7 +1245,7 @@ static int test_kdf_sshkdf(void)
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SSHKDF_SESSION_ID,
sessid, sizeof(sessid));
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_SSHKDF_TYPE,
- kdftype, 0);
+ &kdftype, sizeof(kdftype));
*p = OSSL_PARAM_construct_end();
ret =