projects
/
platform
/
upstream
/
glib-networking.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb2029d
)
gnutls: Appropriate error when server requires cert but none
author
Stef Walter
<stefw@gnome.org>
Thu, 29 Nov 2012 10:00:00 +0000
(11:00 +0100)
committer
Stef Walter
<stefw@gnome.org>
Thu, 29 Nov 2012 22:03:38 +0000
(23:03 +0100)
When the server requires a certificate for auth, but none is
provider, return the appropriate G_TLS_ERROR_CERTIFICATE_REQUIRED
error.
https://bugzilla.gnome.org/show_bug.cgi?id=689260
tls/gnutls/gtlsconnection-gnutls.c
patch
|
blob
|
history
diff --git
a/tls/gnutls/gtlsconnection-gnutls.c
b/tls/gnutls/gtlsconnection-gnutls.c
index
f3602f2
..
2603532
100644
(file)
--- a/
tls/gnutls/gtlsconnection-gnutls.c
+++ b/
tls/gnutls/gtlsconnection-gnutls.c
@@
-750,6
+750,12
@@
end_gnutls_io (GTlsConnectionGnutls *gnutls,
else
return 0;
}
+ else if (status == GNUTLS_E_NO_CERTIFICATE_FOUND)
+ {
+ g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED,
+ _("TLS connection peer did not send a certificate"));
+ return status;
+ }
if (error)
{