summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-02-20 18:07:12 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-02-20 18:07:12 +0000
commite80e78472e0ec127660f2394e9b322d97f280a02 (patch)
tree2d795933ccb034f47bdd2267f1a88fa5e0314daf /lib
parentc0a40d85b27d22d8ad7dce0144e592228d717b06 (diff)
Provide SSL_SESSION_get_protocol_version()
ok jsing
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/Symbols.list1
-rw-r--r--lib/libssl/ssl.h3
-rw-r--r--lib/libssl/ssl_sess.c8
3 files changed, 10 insertions, 2 deletions
diff --git a/lib/libssl/Symbols.list b/lib/libssl/Symbols.list
index b20f29a3281..ed7f9f6e64a 100644
--- a/lib/libssl/Symbols.list
+++ b/lib/libssl/Symbols.list
@@ -135,6 +135,7 @@ SSL_SESSION_get_ex_data
SSL_SESSION_get_ex_new_index
SSL_SESSION_get_id
SSL_SESSION_get_master_key
+SSL_SESSION_get_protocol_version
SSL_SESSION_get_time
SSL_SESSION_get_timeout
SSL_SESSION_new
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h
index 1b7a3fbeba1..47c90fb39db 100644
--- a/lib/libssl/ssl.h
+++ b/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.140 2018/02/17 15:32:20 jsing Exp $ */
+/* $OpenBSD: ssl.h,v 1.141 2018/02/20 18:07:11 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1279,6 +1279,7 @@ const char *SSL_state_string_long(const SSL *s);
const char *SSL_rstate_string_long(const SSL *s);
size_t SSL_SESSION_get_master_key(const SSL_SESSION *ss,
unsigned char *out, size_t max_out);
+int SSL_SESSION_get_protocol_version(SSL_SESSION *s);
long SSL_SESSION_get_time(const SSL_SESSION *s);
long SSL_SESSION_set_time(SSL_SESSION *s, long t);
long SSL_SESSION_get_timeout(const SSL_SESSION *s);
diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c
index 70c6daa22d7..54e39183f51 100644
--- a/lib/libssl/ssl_sess.c
+++ b/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_sess.c,v 1.72 2018/02/17 15:32:20 jsing Exp $ */
+/* $OpenBSD: ssl_sess.c,v 1.73 2018/02/20 18:07:11 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -806,6 +806,12 @@ SSL_SESSION_set_time(SSL_SESSION *s, long t)
return (t);
}
+int
+SSL_SESSION_get_protocol_version(SSL_SESSION *s)
+{
+ return s->ssl_version;
+}
+
X509 *
SSL_SESSION_get0_peer(SSL_SESSION *s)
{