From: Nikos Mavrogiannopoulos Date: Sat, 20 Oct 2001 15:43:29 +0000 (+0000) Subject: corrected bug which caused a fatal alert to be sent even if it X-Git-Tag: gnutls_0_2_9~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a20329f87f77f83ea70d76ada127ad4cd22b6b5;p=thirdparty%2Fgnutls.git corrected bug which caused a fatal alert to be sent even if it wasn't required --- diff --git a/lib/gnutls_kx.c b/lib/gnutls_kx.c index e4dea9f974..732e232658 100644 --- a/lib/gnutls_kx.c +++ b/lib/gnutls_kx.c @@ -502,7 +502,8 @@ int _gnutls_recv_client_certificate(SOCKET cd, GNUTLS_STATE state) return 0; } /* certificate was required */ - gnutls_send_alert( cd, state, GNUTLS_FATAL, GNUTLS_BAD_CERTIFICATE); + if (optional==MANDATORY_PACKET) + gnutls_send_alert( cd, state, GNUTLS_FATAL, GNUTLS_BAD_CERTIFICATE); gnutls_assert(); return ret; }