Add SSL_SESSION_get0_hostname()

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Lyon Chen 2016-04-11 10:08:00 -04:00 committed by Rich Salz
parent ff2344052b
commit 4b6b848785
3 changed files with 7 additions and 0 deletions

View file

@ -1473,6 +1473,7 @@ __owur long SSL_SESSION_get_time(const SSL_SESSION *s);
__owur long SSL_SESSION_set_time(SSL_SESSION *s, long t);
__owur long SSL_SESSION_get_timeout(const SSL_SESSION *s);
__owur long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
__owur const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s);
__owur int SSL_SESSION_has_ticket(const SSL_SESSION *s);
__owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s);
void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick,

View file

@ -925,6 +925,11 @@ long SSL_SESSION_set_time(SSL_SESSION *s, long t)
return (t);
}
const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s)
{
return s->tlsext_hostname;
}
int SSL_SESSION_has_ticket(const SSL_SESSION *s)
{
return (s->tlsext_ticklen > 0) ? 1 : 0;

View file

@ -393,3 +393,4 @@ SSL_CTX_get0_ctlog_store 392 1_1_0 EXIST::FUNCTION:CT
SSL_enable_ct 393 1_1_0 EXIST::FUNCTION:CT
SSL_CTX_enable_ct 394 1_1_0 EXIST::FUNCTION:CT
SSL_CTX_get_ciphers 395 1_1_0 EXIST::FUNCTION:
SSL_SESSION_get0_hostname 396 1_1_0 EXIST::FUNCTION: