mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-06 03:40:04 +00:00
Avoid truncating peer cert info in ssl_server2
This commit is contained in:
parent
f659d2cd40
commit
1c5b9fc19f
@ -1993,10 +1993,12 @@ reset:
|
||||
else
|
||||
mbedtls_printf( " ok\n" );
|
||||
|
||||
if( mbedtls_ssl_get_peer_cert( &ssl ) )
|
||||
if( mbedtls_ssl_get_peer_cert( &ssl ) != NULL )
|
||||
{
|
||||
char crt_buf[512];
|
||||
|
||||
mbedtls_printf( " . Peer certificate information ...\n" );
|
||||
mbedtls_x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ",
|
||||
mbedtls_x509_crt_info( crt_buf, sizeof( crt_buf ), " ",
|
||||
mbedtls_ssl_get_peer_cert( &ssl ) );
|
||||
mbedtls_printf( "%s\n", buf );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user