diff options
author | Matt Caswell <matt@openssl.org> | 2015-02-08 23:37:54 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-02-10 22:54:27 +0000 |
commit | b7c9187b32a14b5b4a850161aed5c044d2130d5a (patch) | |
tree | 7bb7333d67ded04b5c035be5497430a62fa15db0 /ssl | |
parent | ea6bd2645431a064394c746fba7013950ea04f78 (diff) |
Add SSL_SESSION_get0_ticket API function.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl.h | 2 | ||||
-rw-r--r-- | ssl/ssl_sess.c | 8 |
2 files changed, 10 insertions, 0 deletions
@@ -1462,6 +1462,8 @@ long SSL_SESSION_get_timeout(const SSL_SESSION *s); long SSL_SESSION_set_timeout(SSL_SESSION *s, long t); int SSL_SESSION_has_ticket(const SSL_SESSION *s); unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); +void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick, + size_t *len); void SSL_copy_session_id(SSL *to, const SSL *from); X509 *SSL_SESSION_get0_peer(SSL_SESSION *s); int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 0f07ed58a1..cf019c8346 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -858,6 +858,14 @@ unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) return s->tlsext_tick_lifetime_hint; } +void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick, + size_t *len) +{ + *len = s->tlsext_ticklen; + if(tick != NULL) + *tick = s->tlsext_tick; +} + X509 *SSL_SESSION_get0_peer(SSL_SESSION *s) { return s->peer; |