unbreak; we have most of the new BIO_meth_* calls this uses, except for
BIO_meth_set_callback_ctrl(). however in this case it is just setting the callback pointer to NULL, and BIO_meth_new() already returns zeroed space, so just skip that for now.
This commit is contained in:
parent
d630993839
commit
94a8b7debf
39
telephony/kamailio/patches/patch-src_modules_tls_tls_bio_c
Normal file
39
telephony/kamailio/patches/patch-src_modules_tls_tls_bio_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-src_modules_tls_tls_bio_c,v 1.1 2018/02/19 22:43:28 sthen Exp $
|
||||
|
||||
Index: src/modules/tls/tls_bio.c
|
||||
--- src/modules/tls/tls_bio.c.orig
|
||||
+++ src/modules/tls/tls_bio.c
|
||||
@@ -63,7 +63,8 @@ static int tls_bio_mbuf_puts(BIO* b, const char* s);
|
||||
static long tls_bio_mbuf_ctrl(BIO* b, int cmd, long arg1, void* arg2);
|
||||
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x010100000L || \
|
||||
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
|
||||
static BIO_METHOD tls_mbuf_method = {
|
||||
BIO_TYPE_TLS_MBUF, /* type */
|
||||
"sr_tls_mbuf", /* name */
|
||||
@@ -105,7 +106,8 @@ static BIO_METHOD *tls_mbuf_method = NULL;
|
||||
/** returns a custom tls_mbuf BIO. */
|
||||
BIO_METHOD* tls_BIO_mbuf(void)
|
||||
{
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x010100000L || \
|
||||
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
|
||||
return &tls_mbuf_method;
|
||||
#else
|
||||
if(tls_mbuf_method != NULL) {
|
||||
@@ -123,7 +125,13 @@ BIO_METHOD* tls_BIO_mbuf(void)
|
||||
BIO_meth_set_ctrl(tls_mbuf_method, tls_bio_mbuf_ctrl);
|
||||
BIO_meth_set_create(tls_mbuf_method, tls_bio_mbuf_new);
|
||||
BIO_meth_set_destroy(tls_mbuf_method, tls_bio_mbuf_free);
|
||||
+#if defined(LIBRESSL_VERSION_NUMBER)
|
||||
+/*
|
||||
+ * libressl doesn't have this accessor yet, however it's a noop here
|
||||
+ * as BIO_meth_new returns zeroed space
|
||||
+ */
|
||||
BIO_meth_set_callback_ctrl(tls_mbuf_method, NULL);
|
||||
+#endif
|
||||
return tls_mbuf_method;
|
||||
#endif
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user