Skip to content

Commit c2e7a82

Browse files
Patateradbridge
authored andcommitted
tls: Update export keys callback to use const
Mbed TLS's export keys callback requires the hello.random (for both server and client) to be const. Make the callbacks in Mbed OS that use the key export feature use const to match.
1 parent d0ef1c1 commit c2e7a82

File tree

1 file changed

+4
-4
lines changed
  • features/nanostack/sal-stack-nanostack/source/Security/protocols/tls_sec_prot

1 file changed

+4
-4
lines changed

features/nanostack/sal-stack-nanostack/source/Security/protocols/tls_sec_prot/tls_sec_prot_lib.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ static int tls_sec_prot_lib_ssl_send(void *ctx, const unsigned char *buf, size_t
8585
static int tls_sec_prot_lib_ssl_recv(void *ctx, unsigned char *buf, size_t len);
8686
static int tls_sec_prot_lib_ssl_export_keys(void *p_expkey, const unsigned char *ms,
8787
const unsigned char *kb, size_t maclen, size_t keylen,
88-
size_t ivlen, unsigned char client_random[32],
89-
unsigned char server_random[32],
88+
size_t ivlen, const unsigned char client_random[32],
89+
const unsigned char server_random[32],
9090
mbedtls_tls_prf_types tls_prf_type);
9191
#ifdef TLS_SEC_PROT_LIB_TLS_DEBUG
9292
static void tls_sec_prot_lib_debug(void *ctx, int level, const char *file, int line, const char *string);
@@ -405,8 +405,8 @@ static int tls_sec_prot_lib_ssl_recv(void *ctx, unsigned char *buf, size_t len)
405405

406406
static int tls_sec_prot_lib_ssl_export_keys(void *p_expkey, const unsigned char *ms,
407407
const unsigned char *kb, size_t maclen, size_t keylen,
408-
size_t ivlen, unsigned char client_random[32],
409-
unsigned char server_random[32],
408+
size_t ivlen, const unsigned char client_random[32],
409+
const unsigned char server_random[32],
410410
mbedtls_tls_prf_types tls_prf_type)
411411
{
412412
(void) kb;

0 commit comments

Comments
 (0)