summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2021-09-08 12:32:07 +0000
committertb <>2021-09-08 12:32:07 +0000
commit81bcc65bf759a3ea0181db3b72dade5269ae35ff (patch)
treec724632fdc19c7e0c103484971c168a526d9c819 /src/lib
parentae0785bbe06a3bd6d1b155469685f3f19dd4c7e9 (diff)
downloadopenbsd-81bcc65bf759a3ea0181db3b72dade5269ae35ff.tar.gz
openbsd-81bcc65bf759a3ea0181db3b72dade5269ae35ff.tar.bz2
openbsd-81bcc65bf759a3ea0181db3b72dade5269ae35ff.zip
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 'src/lib')
-rw-r--r--src/lib/libssl/ssl.h5
-rw-r--r--src/lib/libssl/ssl_lib.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index 46f24b2ea9..b8cfb771b6 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.196 2021/06/30 18:07:50 jsing Exp $ */ 1/* $OpenBSD: ssl.h,v 1.197 2021/09/08 12:32:07 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1256,6 +1256,9 @@ int SSL_set_rfd(SSL *s, int fd);
1256int SSL_set_wfd(SSL *s, int fd); 1256int SSL_set_wfd(SSL *s, int fd);
1257void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio); 1257void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio);
1258BIO * SSL_get_rbio(const SSL *s); 1258BIO * SSL_get_rbio(const SSL *s);
1259#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
1260void SSL_set0_rbio(SSL *s, BIO *rbio);
1261#endif
1259BIO * SSL_get_wbio(const SSL *s); 1262BIO * SSL_get_wbio(const SSL *s);
1260int SSL_set_cipher_list(SSL *s, const char *str); 1263int SSL_set_cipher_list(SSL *s, const char *str);
1261#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL) 1264#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 142771c423..ef2a92ffe3 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.264 2021/09/04 15:21:45 beck Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.265 2021/09/08 12:32:07 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -614,6 +614,13 @@ SSL_get_rbio(const SSL *s)
614 return (s->rbio); 614 return (s->rbio);
615} 615}
616 616
617void
618SSL_set0_rbio(SSL *s, BIO *rbio)
619{
620 BIO_free_all(s->rbio);
621 s->rbio = rbio;
622}
623
617BIO * 624BIO *
618SSL_get_wbio(const SSL *s) 625SSL_get_wbio(const SSL *s)
619{ 626{