diff options
author | TJ Saunders <tj@castaglia.org> | 2016-05-26 15:40:13 -0700 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-05-31 17:16:29 -0400 |
commit | bd01f6498c2c5007df64ba88c5d88ff15b0376cb (patch) | |
tree | eae87797af4e605a3af32ddfbe81221ca414500e /ssl/ssl_sess.c | |
parent | 6d1e7709c67fa258527e58b797dc581c4e236f20 (diff) | |
download | openssl-bd01f6498c2c5007df64ba88c5d88ff15b0376cb.tar.gz |
Add an SSL_SESSION accessor for obtaining the protocol version number, with
accompanying documentation.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1135)
Diffstat (limited to 'ssl/ssl_sess.c')
-rw-r--r-- | ssl/ssl_sess.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index f168900dea..128d2d7942 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -828,6 +828,13 @@ long SSL_SESSION_set_time(SSL_SESSION *s, long t) return (t); } +int SSL_SESSION_get_protocol_version(const SSL_SESSION *s) +{ + if (s == NULL) + return (0); + return s->ssl_version; +} + const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s) { return s->tlsext_hostname; |