After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689260 - Fix problems with TLS client auth failure
Fix problems with TLS client auth failure
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-11-29 10:07 UTC by Stef Walter
Modified: 2012-11-29 22:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnutls: Appropriate error when server requires cert but none (1.05 KB, patch)
2012-11-29 10:07 UTC, Stef Walter
committed Details | Review
gnutls: Allow closing a connection cleanly if handshake fails (1.24 KB, patch)
2012-11-29 10:07 UTC, Stef Walter
committed Details | Review
tls: Add a test for client certificate auth failure (6.11 KB, patch)
2012-11-29 10:07 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2012-11-29 10:07:03 UTC
Some corner-case problems manifest themselves when the client certificate auth
fails. See attached patches for descriptions of the issues.
Comment 1 Stef Walter 2012-11-29 10:07:06 UTC
Created attachment 230162 [details] [review]
gnutls: Appropriate error when server requires cert but none

When the server requires a certificate for auth, but none is
provider, return the appropriate G_TLS_ERROR_CERTIFICATE_REQUIRED
error.
Comment 2 Stef Walter 2012-11-29 10:07:10 UTC
Created attachment 230163 [details] [review]
gnutls: Allow closing a connection cleanly if handshake fails

Only set the internal ever_handshaked flag if the handshake was
successful. Otherwise using g_io_stream_close() after a handshake
failure results in an internal gnutls error.
Comment 3 Stef Walter 2012-11-29 10:07:15 UTC
Created attachment 230164 [details] [review]
tls: Add a test for client certificate auth failure

Add a test where the server requires a certificate from the client
but the server doesn't provide any.
Comment 4 Dan Winship 2012-11-29 15:51:10 UTC
Comment on attachment 230162 [details] [review]
gnutls: Appropriate error when server requires cert but none

ok, though a test would be nice too
Comment 5 Dan Winship 2012-11-29 15:51:59 UTC
Comment on attachment 230164 [details] [review]
tls: Add a test for client certificate auth failure

oh, hey, how bout that
Comment 6 Stef Walter 2012-11-29 22:05:02 UTC
Attachment 230162 [details] pushed as 81a9ae3 - gnutls: Appropriate error when server requires cert but none
Attachment 230163 [details] pushed as 0084d6b - gnutls: Allow closing a connection cleanly if handshake fails
Attachment 230164 [details] pushed as 8576a5f - tls: Add a test for client certificate auth failure