mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-26 03:35:35 +00:00
Add certificate request echo
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
3e536442f5
commit
537530d57a
@ -930,8 +930,17 @@ static int ssl_tls13_write_certificate_body( mbedtls_ssl_context *ssl,
|
||||
|
||||
|
||||
/* Write certificate_request_context */
|
||||
/* empty certificate_request_context with length 0 */
|
||||
*p++ = 0;
|
||||
*p++ = ssl->handshake->certificate_request_context_len;
|
||||
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 */
|
||||
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 3 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user