summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-09-08 12:32:08 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-09-08 12:32:08 +0000
commit4ef8e774f26dc39b09a205ceb4cde80911edb1ff (patch)
treef8ea1caa7c04d518ea4ab5fbd71ebfbb7513bba8 /lib/libssl
parente15c223242b666cef213cd03f1362cd604a42135 (diff)
Prepare to provide SSL_set0_rbio()
This is needed for telephony/coturn and telephony/resiprocate to compile without opaque SSL. ok inoguchi jsing
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/ssl.h5
-rw-r--r--lib/libssl/ssl_lib.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h
index 46f24b2ea9f..b8cfb771b6a 100644
--- a/lib/libssl/ssl.h
+++ b/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.196 2021/06/30 18:07:50 jsing Exp $ */
+/* $OpenBSD: ssl.h,v 1.197 2021/09/08 12:32:07 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1256,6 +1256,9 @@ int SSL_set_rfd(SSL *s, int fd);
int SSL_set_wfd(SSL *s, int fd);
void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio);
BIO * SSL_get_rbio(const SSL *s);
+#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
+void SSL_set0_rbio(SSL *s, BIO *rbio);
+#endif
BIO * SSL_get_wbio(const SSL *s);
int SSL_set_cipher_list(SSL *s, const char *str);
#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index 142771c423f..ef2a92ffe35 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.264 2021/09/04 15:21:45 beck Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.265 2021/09/08 12:32:07 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -614,6 +614,13 @@ SSL_get_rbio(const SSL *s)
return (s->rbio);
}
+void
+SSL_set0_rbio(SSL *s, BIO *rbio)
+{
+ BIO_free_all(s->rbio);
+ s->rbio = rbio;
+}
+
BIO *
SSL_get_wbio(const SSL *s)
{