mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add certificate request echo
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
@ -930,8 +930,17 @@ static int ssl_tls13_write_certificate_body( mbedtls_ssl_context *ssl,
|
|||||||
|
|
||||||
|
|
||||||
/* Write certificate_request_context */
|
/* Write certificate_request_context */
|
||||||
/* empty certificate_request_context with length 0 */
|
*p++ = ssl->handshake->certificate_request_context_len;
|
||||||
*p++ = 0;
|
if( ssl->handshake->certificate_request_context_len > 0 )
|
||||||
|
{
|
||||||
|
MBEDTLS_SSL_CHK_BUF_PTR( p, end,
|
||||||
|
ssl->handshake->certificate_request_context_len );
|
||||||
|
memcpy( p,
|
||||||
|
ssl->handshake->certificate_request_context,
|
||||||
|
ssl->handshake->certificate_request_context_len );
|
||||||
|
p += ssl->handshake->certificate_request_context_len;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Reserve space for certificate_list_len */
|
/* Reserve space for certificate_list_len */
|
||||||
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 3 );
|
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 3 );
|
||||||
|
Reference in New Issue
Block a user