[glib-networking] openssl: handle SSL_R_TLSV1_ALERT_UNKNOWN_CA
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] openssl: handle SSL_R_TLSV1_ALERT_UNKNOWN_CA
- Date: Thu, 16 May 2019 08:19:39 +0000 (UTC)
commit ed484287ff10b70020924d4121034fb10de97f65
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Thu May 16 10:19:02 2019 +0200
openssl: handle SSL_R_TLSV1_ALERT_UNKNOWN_CA
tls/openssl/gtlsconnection-openssl.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index 30cf058..04f6505 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -166,6 +166,14 @@ end_openssl_io (GTlsConnectionOpenssl *openssl,
return G_TLS_CONNECTION_BASE_ERROR;
}
+ if (reason == SSL_R_TLSV1_ALERT_UNKNOWN_CA)
+ {
+ g_clear_error (&my_error);
+ g_set_error (error, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE,
+ _("Unacceptable TLS certificate authority"));
+ return G_TLS_CONNECTION_BASE_ERROR;
+ }
+
if (err_lib == ERR_LIB_RSA && reason == RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY)
{
g_clear_error (&my_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]