From fa63645ec8efbf728c802b863c3022616cde49d6 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 12 Sep 2019 10:47:37 +0100 Subject: [PATCH] ssl: Remove key exporter bug workaround It is no longer necessary to cast the randbytes to non-const when exporting keys. --- library/ssl_tls.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index f4bca87d21..a7facb81a2 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -1427,9 +1427,8 @@ static int ssl_populate_transform( mbedtls_ssl_transform *transform, master, keyblk, mac_key_len, keylen, iv_copy_len, - /* work around bug in exporter type */ - (unsigned char *) randbytes + 32, - (unsigned char *) randbytes, + randbytes + 32, + randbytes, tls_prf_get_type( tls_prf ) ); } #endif