[glib-networking/wip/openssl: 28/31] Set the certificate even if there is a bad certificate error
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/openssl: 28/31] Set the certificate even if there is a bad certificate error
- Date: Mon, 9 Nov 2015 08:06:23 +0000 (UTC)
commit af1b91277bff090643fe561f2472b62e50f7636a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Fri Nov 6 11:31:38 2015 +0100
Set the certificate even if there is a bad certificate error
tls/openssl/gtlsconnection-openssl.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index b3c634a..c3bd5b3 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -316,6 +316,7 @@ g_tls_connection_openssl_complete_handshake (GTlsConnectionBase *tls,
GTlsConnectionOpensslPrivate *priv;
GTlsCertificate *peer_certificate;
GTlsCertificateFlags peer_certificate_errors = 0;
+ GTlsConnectionBaseStatus status = G_TLS_CONNECTION_BASE_OK;
priv = g_tls_connection_openssl_get_instance_private (openssl);
@@ -331,7 +332,7 @@ g_tls_connection_openssl_complete_handshake (GTlsConnectionBase *tls,
{
g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE,
_("Unacceptable TLS certificate"));
- return G_TLS_CONNECTION_BASE_ERROR;
+ status = G_TLS_CONNECTION_BASE_ERROR;
}
g_tls_connection_base_set_peer_certificate (G_TLS_CONNECTION_BASE (openssl),
@@ -339,7 +340,7 @@ g_tls_connection_openssl_complete_handshake (GTlsConnectionBase *tls,
peer_certificate_errors);
}
- return G_TLS_CONNECTION_BASE_OK;
+ return status;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]