Skip to content

Commit 5972a90

Browse files
author
Andras Fekete
committed
Fix test case tls1_prf and hkdf
Hex values are expected to have an even length. Evidently, they should not have ':'.
1 parent 058bfc3 commit 5972a90

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

test/test_hkdf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ static int test_hkdf_hexstr_calc(OSSL_LIB_CTX* libCtx, unsigned char *key,
199199
{
200200
int err = 0;
201201
EVP_PKEY_CTX *ctx = NULL;
202-
const char* inKey = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00";
203-
const char* salt = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00";
204-
const char* info = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00";
202+
const char* inKey = "00000000000000000000000000000000";
203+
const char* salt = "00000000000000000000000000000000";
204+
const char* info = "00000000000000000000000000000000";
205205
size_t len = keyLen;
206206

207207
if (strncmp("EXTRACT_ONLY", mode, 12) == 0) {

test/test_tls1_prf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ static int test_tls1_prf_hexstr_calc(OSSL_LIB_CTX* libCtx, unsigned char *key,
180180
{
181181
int err = 0;
182182
EVP_PKEY_CTX *ctx = NULL;
183-
const char* secret = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00";
184-
const char* label = "31:32:33:34:34:35:36";
185-
const char* seed = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00";
183+
const char* secret = "00000000000000000000000000000000";
184+
const char* label = "31323334343536";
185+
const char* seed = "00000000000000000000000000000000";
186186
size_t len = keyLen;
187187

188188
ctx = EVP_PKEY_CTX_new_from_name(libCtx, "TLS1-PRF", NULL);

0 commit comments

Comments
 (0)