Package: gnutls26 / 2.12.20-8+deb7u5

37_fix_rejection-of-v1-intermedi.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: fix rejection of v1 intermediate CA
 Fix bug that prevented the rejection of v1 intermediate CA
 certificates.
 Reported by Suman Jana.
 This is b1abfe3d182d68539900092eb42fc62cf1bb7e7c from upstream git,
 unfuzzed for 2.12.x by Andreas Metzler.
Author: Nikos Mavrogiannopoulos <nmav@redhat.com>
Origin: upstream
Bug: http://www.gnutls.org/security.html#GNUTLS-SA-2014-1
Forwarded: not-needed
Last-Update: 2014-02-15

--- gnutls26-2.12.23.orig/lib/x509/verify.c
+++ gnutls26-2.12.23/lib/x509/verify.c
@@ -644,8 +644,10 @@ _gnutls_x509_verify_certificate (const g
       /* note that here we disable this V1 CA flag. So that no version 1
        * certificates can exist in a supplied chain.
        */
-      if (!(flags & GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT))
+      if (!(flags & GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT)) {
         flags &= ~(GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
+	flags |= GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT;
+      }
       if ((ret =
            _gnutls_verify_certificate2 (certificate_list[i - 1],
                                         &certificate_list[i], 1, flags,