mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-10-20 21:50:48 +08:00
correct logic in ssl_msg
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
@@ -711,21 +711,6 @@ static void ssl_extract_add_data_from_record(unsigned char *add_data,
|
|||||||
|
|
||||||
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||||
|
|
||||||
if (rec->cid_len != 0) {
|
|
||||||
// CID
|
|
||||||
memcpy(cur, rec->cid, rec->cid_len);
|
|
||||||
cur += rec->cid_len;
|
|
||||||
|
|
||||||
// cid_length
|
|
||||||
*cur = rec->cid_len;
|
|
||||||
cur++;
|
|
||||||
|
|
||||||
// length of inner plaintext
|
|
||||||
MBEDTLS_PUT_UINT16_BE(ad_len_field, cur, 0);
|
|
||||||
cur += 2;
|
|
||||||
} else
|
|
||||||
#elif defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
|
||||||
|
|
||||||
if (rec->cid_len != 0) {
|
if (rec->cid_len != 0) {
|
||||||
// epoch + sequence number
|
// epoch + sequence number
|
||||||
memcpy(cur, rec->ctr, sizeof(rec->ctr));
|
memcpy(cur, rec->ctr, sizeof(rec->ctr));
|
||||||
|
Reference in New Issue
Block a user