[glib-networking: 23/129] bio: do not return a const BIO_METHOD on old openssl
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking: 23/129] bio: do not return a const BIO_METHOD on old openssl
- Date: Sat, 2 Feb 2019 22:45:19 +0000 (UTC)
commit 4ab84d36563d3c1a88e2e126737c841f15d8fe62
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Mar 8 10:52:45 2017 +0100
bio: do not return a const BIO_METHOD on old openssl
tls/openssl/gtlsbio.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/tls/openssl/gtlsbio.c b/tls/openssl/gtlsbio.c
index fadbdef..1de1515 100644
--- a/tls/openssl/gtlsbio.c
+++ b/tls/openssl/gtlsbio.c
@@ -250,12 +250,16 @@ static BIO_METHOD methods_gtls = {
static BIO_METHOD *methods_gtls = NULL;
#endif
-static const BIO_METHOD *
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+static BIO_METHOD *
BIO_s_gtls (void)
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
return &methods_gtls;
+}
#else
+static const BIO_METHOD *
+BIO_s_gtls (void)
+{
if (methods_gtls == NULL)
{
methods_gtls = BIO_meth_new (BIO_TYPE_SOURCE_SINK | BIO_get_new_index (), "gtls");
@@ -270,8 +274,8 @@ BIO_s_gtls (void)
return NULL;
}
return methods_gtls;
-#endif
}
+#endif
BIO *
g_tls_bio_new (GIOStream *io_stream)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]