summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2007-10-09 11:37:45 +0300
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2007-10-09 11:37:45 +0300
commit72b99e94b1ecb51a2182645797e6153baeb60fc4 (patch)
treebd6079a913262fdd07d861491aa93503a768a8cf /lib
parent3c89e702c3f5210c700788faf42bb48dc6a2003f (diff)
downloadgnutls-72b99e94b1ecb51a2182645797e6153baeb60fc4.tar.gz
Changed the certificate reading logic to allow for more buggy implementations
that send 0B 00 00 06 00 00 03 00 00 00 as an empty certificate message. (we already allow for 0B 00 00 00 and 0B 00 00 03 00 00 00)
Diffstat (limited to 'lib')
-rw-r--r--lib/auth_cert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index 54b4a50d13..7c318e9059 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -869,7 +869,10 @@ _gnutls_proc_x509_server_certificate (gnutls_session_t session,
size = _gnutls_read_uint24 (p);
p += 3;
- if (size == 0)
+ /* some implementations send 0B 00 00 06 00 00 03 00 00 00
+ * instead of just 0B 00 00 03 00 00 00 as an empty certificate message.
+ */
+ if (size == 0 || size == 3)
{
gnutls_assert ();
/* no certificate was sent */