From 274bd5fb0e07a986a4450b5c8dd32fb46dc628fa Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 20 Feb 2018 18:07:11 +0000 Subject: [PATCH] Provide SSL_SESSION_get_protocol_version() ok jsing --- lib/libssl/Symbols.list | 1 + lib/libssl/ssl.h | 3 ++- lib/libssl/ssl_sess.c | 8 +++++++- 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) { -- 2.20.1