From 4932f9f22969fd18c757ef9d2c53ea1d8bd9b81d Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 3 May 2019 15:23:51 +0100 Subject: [PATCH] Re-enable passing CIDs to record transforms --- library/ssl_tls.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index c2a84777d..b5aeac174 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -742,13 +742,11 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl ) { MBEDTLS_SSL_DEBUG_MSG( 3, ( "Copy CIDs into SSL transform" ) ); - /* Uncomment this once CID-parsing and support for a change - * record content type during record decryption are added. */ - /* transform->in_cid_len = ssl->own_cid_len; */ - /* transform->out_cid_len = ssl->handshake->peer_cid_len; */ - /* memcpy( transform->in_cid, ssl->own_cid, ssl->own_cid_len ); */ - /* memcpy( transform->out_cid, ssl->handshake->peer_cid, */ - /* ssl->handshake->peer_cid_len ); */ + transform->in_cid_len = ssl->own_cid_len; + transform->out_cid_len = ssl->handshake->peer_cid_len; + memcpy( transform->in_cid, ssl->own_cid, ssl->own_cid_len ); + memcpy( transform->out_cid, ssl->handshake->peer_cid, + ssl->handshake->peer_cid_len ); MBEDTLS_SSL_DEBUG_BUF( 3, "Outgoing CID", transform->out_cid, transform->out_cid_len );