[sr #107489] ipsec_ike_key created in wrong code path

Micah Anderson INVALID.NOREPLY at gnu.org
Sat Oct 2 15:36:40 CEST 2010


                 Summary: ipsec_ike_key created in wrong code path
                 Project: GnuTLS
            Submitted by: micahanderson
            Submitted on: Sat 02 Oct 2010 01:36:39 PM GMT
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None



The ipsec_ike_key patch submitted in #107485 creates a certificate with the
KU flag for ipsec IKE only when the "ca" flag is set. The reason for this is
the get_ipsec_ike_status() check in src/certtool.c:547 is wrapped inside an if
(ca_status) predicate.

This is wrong, because you should not be a CA to offer a cert for IKE. In
fact, IKE should not appear in a CA certificate, but otherwise should be
independent of any other status as it is not unreasonable to want to use such
a certificate for other things on the host, such as a WWW server.

It is for this reason I've adjusted the patch to make it fall under the if
(!ca_status || server) predicate, instead of under the if (ca_status)

Additionally, an IKE certificate should be able to set the SubjectAltName
(ie. dns_name parameters in the config; and ip_address parameters in the
config) v3 extensions. To achieve this I've added an is_ike check and added
the test to see if that is set along with the other checks that were
happening, and then if so add the get_dns_name_set (TYPE_CRT, crt);
get_ip_addr_set (TYPE_CRT, crt); to the cert. 

Attached is a patch to the 2_10_x branch, as well as patch to the HEAD of
master. You can also find these commits in my repository
git://labs.riseup.net/~micah/gnutls there are two branches there, one for
2_10_x and one against master (which has been rebased against the latest
upstream commits).


File Attachments:

Date: Sat 02 Oct 2010 01:36:39 PM GMT  Name: ipsec_ike_gnutls_2_10_2.diff 
Size: 2kB   By: micahanderson

Date: Sat 02 Oct 2010 01:36:39 PM GMT  Name: ipsec_ike_gnutls_master.diff 
Size: 2kB   By: micahanderson



Reply to this item at:


  Message sent via/by Savannah

More information about the Gnutls-devel mailing list