From d1f203557fb673a50077dc50411b4259a3df0519 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 15 May 2019 10:21:55 +0100 Subject: [PATCH] Slightly reorder CID debug messages during creation of transforms --- library/ssl_tls.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 8a796b5aa..633b041c5 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -977,15 +977,15 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl ) MBEDTLS_SSL_DEBUG_MSG( 3, ( "Copy CIDs into SSL transform" ) ); 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 ); MBEDTLS_SSL_DEBUG_BUF( 3, "Incoming CID", transform->in_cid, transform->in_cid_len ); + + transform->out_cid_len = ssl->handshake->peer_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 ); } #endif /* MBEDTLS_SSL_CID */