Add new_session_ticket err handler
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
f8a4994ec7
commit
2b4f02d7fb
1 changed files with 15 additions and 5 deletions
|
@ -2645,8 +2645,6 @@ send_request:
|
||||||
/*
|
/*
|
||||||
* 7. Read the HTTP response
|
* 7. Read the HTTP response
|
||||||
*/
|
*/
|
||||||
mbedtls_printf( " < Read from server:" );
|
|
||||||
fflush( stdout );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TLS and DTLS need different reading styles (stream vs datagram)
|
* TLS and DTLS need different reading styles (stream vs datagram)
|
||||||
|
@ -2694,6 +2692,18 @@ send_request:
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto reconnect;
|
goto reconnect;
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||||
|
case MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET:
|
||||||
|
/* We were waiting for application data but got
|
||||||
|
* a NewSessionTicket instead. */
|
||||||
|
mbedtls_printf( " got new session ticket.\n" );
|
||||||
|
continue;
|
||||||
|
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
||||||
|
|
||||||
|
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n",
|
mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n",
|
||||||
(unsigned int) -ret );
|
(unsigned int) -ret );
|
||||||
|
@ -2703,8 +2713,8 @@ send_request:
|
||||||
|
|
||||||
len = ret;
|
len = ret;
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf );
|
mbedtls_printf( " < Read from server: %d bytes read\n\n%s", len, (char *) buf );
|
||||||
|
fflush( stdout );
|
||||||
/* End of message should be detected according to the syntax of the
|
/* End of message should be detected according to the syntax of the
|
||||||
* application protocol (eg HTTP), just use a dummy test here. */
|
* application protocol (eg HTTP), just use a dummy test here. */
|
||||||
if( ret > 0 && buf[len-1] == '\n' )
|
if( ret > 0 && buf[len-1] == '\n' )
|
||||||
|
@ -2767,7 +2777,7 @@ send_request:
|
||||||
|
|
||||||
len = ret;
|
len = ret;
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf );
|
mbedtls_printf( " < Read from server: %d bytes read\n\n%s", len, (char *) buf );
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue