[glib-networking] openssl: add back the dummy verify callback
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] openssl: add back the dummy verify callback
- Date: Thu, 16 May 2019 11:03:46 +0000 (UTC)
commit 8c67b140bbe5e88b9ddcf2d3f91b55aca3317dae
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Thu May 16 13:02:56 2019 +0200
openssl: add back the dummy verify callback
The certificate verification happens on handshake on our case
tls/openssl/gtlsserverconnection-openssl.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/tls/openssl/gtlsserverconnection-openssl.c b/tls/openssl/gtlsserverconnection-openssl.c
index 3c3f363..a42294a 100644
--- a/tls/openssl/gtlsserverconnection-openssl.c
+++ b/tls/openssl/gtlsserverconnection-openssl.c
@@ -172,6 +172,13 @@ g_tls_server_connection_openssl_set_property (GObject *object,
}
}
+static int
+verify_callback (int preverify_ok,
+ X509_STORE_CTX *ctx)
+{
+ return 1;
+}
+
static void
g_tls_server_connection_openssl_prepare_handshake (GTlsConnectionBase *tls,
gchar **advertised_protocols)
@@ -194,7 +201,7 @@ g_tls_server_connection_openssl_prepare_handshake (GTlsConnectionBase *tls,
break;
}
- SSL_set_verify (openssl->ssl, req_mode, NULL);
+ SSL_set_verify (openssl->ssl, req_mode, verify_callback);
/* FIXME: is this ok? */
SSL_set_verify_depth (openssl->ssl, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]