[glib-networking] openssl: Fix miscellaneous warnings and errors
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] openssl: Fix miscellaneous warnings and errors
- Date: Mon, 4 Feb 2019 16:42:39 +0000 (UTC)
commit 4ca53e6ddb10f225051f9fbf0d6ebc9c6e032db3
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Feb 4 10:33:11 2019 -0600
openssl: Fix miscellaneous warnings and errors
tls/openssl/gtlsbackend-openssl.c | 9 +++++++++
tls/openssl/gtlsclientconnection-openssl.c | 2 +-
tls/openssl/openssl-util.c | 1 +
tls/tests/connection.c | 4 ++++
4 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/tls/openssl/gtlsbackend-openssl.c b/tls/openssl/gtlsbackend-openssl.c
index 34837cf..96428ac 100644
--- a/tls/openssl/gtlsbackend-openssl.c
+++ b/tls/openssl/gtlsbackend-openssl.c
@@ -55,6 +55,11 @@ struct CRYPTO_dynlock_value {
GMutex mutex;
};
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
static unsigned long
id_cb (void)
{
@@ -106,6 +111,10 @@ dyn_destroy_cb (struct CRYPTO_dynlock_value *l,
g_free (l);
}
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
+
static gpointer
gtls_openssl_init (gpointer data)
{
diff --git a/tls/openssl/gtlsclientconnection-openssl.c b/tls/openssl/gtlsclientconnection-openssl.c
index 4f129ba..c4bcdf6 100644
--- a/tls/openssl/gtlsclientconnection-openssl.c
+++ b/tls/openssl/gtlsclientconnection-openssl.c
@@ -397,7 +397,7 @@ retrieve_certificate (SSL *ssl,
}
static int
-generate_session_id (const SSL *ssl,
+generate_session_id (SSL *ssl,
unsigned char *id,
unsigned int *id_len)
{
diff --git a/tls/openssl/openssl-util.c b/tls/openssl/openssl-util.c
index c78cb6d..4c8cffe 100644
--- a/tls/openssl/openssl-util.c
+++ b/tls/openssl/openssl-util.c
@@ -65,6 +65,7 @@
#include "openssl-util.h"
#include <string.h>
+#include <strings.h>
#include "openssl-include.h"
#ifdef _MSC_VER
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 0f47feb..d1b2681 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -1047,6 +1047,7 @@ test_client_auth_rehandshake (TestConnection *test,
static gboolean
client_can_receive_certificate_required_errors (TestConnection *test)
{
+#ifdef BACKEND_IS_GNUTLS
gnutls_priority_t priority_cache;
int ret;
int i;
@@ -1076,6 +1077,9 @@ client_can_receive_certificate_required_errors (TestConnection *test)
}
return max_proto <= GNUTLS_TLS1_2;
+#else
+ return TRUE;
+#endif
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]