From 939bb4d8f6f10dd79f8fec3f6b1b4b8a9d4fd928 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 8 Sep 2020 10:48:55 +0100 Subject: [PATCH] Initialize TLS 1.3 label prefix with string literal This is in line with how the entries of the TLS 1.3 label structure `mbedtls_ssl_tls1_3_labels` are initialized. Signed-off-by: Hanno Becker --- library/ssl_tls13_keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl_tls13_keys.c b/library/ssl_tls13_keys.c index a899b7b9f..76c939846 100644 --- a/library/ssl_tls13_keys.c +++ b/library/ssl_tls13_keys.c @@ -91,7 +91,7 @@ static void ssl_tls1_3_hkdf_encode_label( const unsigned char *ctx, size_t clen, unsigned char *dst, size_t *dlen ) { - const char label_prefix[6] = { 't', 'l', 's', '1', '3', ' ' }; + const char label_prefix[6] = "tls13 "; size_t total_label_len = sizeof( label_prefix ) + llen; size_t total_hkdf_lbl_len = SSL_TLS1_3_KEY_SCHEDULE_HKDF_LABEL_LEN( total_label_len, clen );