mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
- Added ssl_get_peer_cert() to SSL API
This commit is contained in:
@ -539,7 +539,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
printf( " . Peer certificate information ...\n" );
|
||||
x509parse_cert_info( (char *) buf, sizeof( buf ) - 1, " ",
|
||||
ssl.session->peer_cert );
|
||||
ssl_get_peer_cert( &ssl ) );
|
||||
printf( "%s\n", buf );
|
||||
|
||||
/*
|
||||
|
@ -172,7 +172,7 @@ int do_handshake( ssl_context *ssl, struct options *opt )
|
||||
|
||||
printf( " . Peer certificate information ...\n" );
|
||||
x509parse_cert_info( (char *) buf, sizeof( buf ) - 1, " ",
|
||||
ssl->session->peer_cert );
|
||||
ssl_get_peer_cert( &ssl ) );
|
||||
printf( "%s\n", buf );
|
||||
|
||||
return( 0 );
|
||||
|
@ -501,7 +501,7 @@ reset:
|
||||
{
|
||||
printf( " failed\n" );
|
||||
|
||||
if( !ssl.session->peer_cert )
|
||||
if( !ssl_get_peer_cert( &ssl ) )
|
||||
printf( " ! no client certificate sent\n" );
|
||||
|
||||
if( ( ret & BADCERT_EXPIRED ) != 0 )
|
||||
@ -518,11 +518,11 @@ reset:
|
||||
else
|
||||
printf( " ok\n" );
|
||||
|
||||
if( ssl.session->peer_cert )
|
||||
if( ssl_get_peer_cert( &ssl ) )
|
||||
{
|
||||
printf( " . Peer certificate information ...\n" );
|
||||
x509parse_cert_info( (char *) buf, sizeof( buf ) - 1, " ",
|
||||
ssl.session->peer_cert );
|
||||
ssl_get_peer_cert( &ssl ) );
|
||||
printf( "%s\n", buf );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user