mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Add accessor to retrieve SNI during handshake
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
@ -1389,6 +1389,13 @@ void mbedtls_ssl_conf_ca_cb( mbedtls_ssl_config *conf,
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C */
|
||||
|
||||
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
|
||||
const unsigned char *mbedtls_ssl_get_hs_sni( mbedtls_ssl_context *ssl,
|
||||
size_t *name_len )
|
||||
{
|
||||
*name_len = ssl->handshake->sni_name_len;
|
||||
return( ssl->handshake->sni_name );
|
||||
}
|
||||
|
||||
int mbedtls_ssl_set_hs_own_cert( mbedtls_ssl_context *ssl,
|
||||
mbedtls_x509_crt *own_cert,
|
||||
mbedtls_pk_context *pk_key )
|
||||
|
Reference in New Issue
Block a user