summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-05-10 17:07:25 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-05-10 17:07:25 +0000
commit671be8a8c62dacf25964a9995a7ba960abbdc193 (patch)
tree22460f54d6fc383e817dc5b174bcee682cbbb3da
parenta6005abd66596ffa0df8611efc290a07cdf2882b (diff)
Provide SSL_SESSION_get0_cipher(3)
ok jsing
-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 41ccd7fe9c0..13ed8add5d2 100644
--- a/lib/libssl/Symbols.list
+++ b/lib/libssl/Symbols.list
@@ -153,6 +153,7 @@ SSL_CTX_use_certificate_chain_file
SSL_CTX_use_certificate_chain_mem
SSL_CTX_use_certificate_file
SSL_SESSION_free
+SSL_SESSION_get0_cipher
SSL_SESSION_get0_id_context
SSL_SESSION_get0_peer
SSL_SESSION_get_compress_id
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h
index 2ac2bcbb54e..987d06ee044 100644
--- a/lib/libssl/ssl.h
+++ b/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.188 2021/05/10 17:05:26 tb Exp $ */
+/* $OpenBSD: ssl.h,v 1.189 2021/05/10 17:07:23 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1373,6 +1373,7 @@ const char *SSL_state_string(const SSL *s);
const char *SSL_rstate_string(const SSL *s);
const char *SSL_state_string_long(const SSL *s);
const char *SSL_rstate_string_long(const SSL *s);
+const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *ss);
size_t SSL_SESSION_get_master_key(const SSL_SESSION *ss,
unsigned char *out, size_t max_out);
int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c
index 4d5b8156c41..68298db8095 100644
--- a/lib/libssl/ssl_sess.c
+++ b/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_sess.c,v 1.102 2021/02/20 08:30:52 jsing Exp $ */
+/* $OpenBSD: ssl_sess.c,v 1.103 2021/05/10 17:07:24 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -873,6 +873,12 @@ SSL_SESSION_get_protocol_version(const SSL_SESSION *s)
return s->ssl_version;
}
+const SSL_CIPHER *
+SSL_SESSION_get0_cipher(const SSL_SESSION *s)
+{
+ return s->cipher;
+}
+
X509 *
SSL_SESSION_get0_peer(SSL_SESSION *s)
{