[Help-gnutls] Parsing certificate extensions and issuer alt names
nmav at gnutls.org
Tue Jul 14 23:18:19 CEST 2009
Brad Hards wrote:
> On Monday 13 July 2009 16:33:48 Nikos Mavrogiannopoulos wrote:
>> Actually I think it might be much easier to do that inside gnutls by
>> extending get_subject_alt_name() to be able to accept the OID as
>> parameter to parse the 188.8.131.52 extension as well. Then would be easy
>> to submit a gnutls_x509_crt_get_issuer_alt_name that can be added to
> I had a first cut at this. See attached patch.
> Thoughts / comments?
Looks ok to me. Only some comment:
+ if (strncmp("184.108.40.206", extension_id, 9) == 0)
+ result = asn1_create_element(_gnutls_get_pkix (),
+ else if (strncmp("220.127.116.11", extension_id, 9) == 0)
Here it should have been strcmp instead of strncmp to avoid having false
positives (such as 18.104.22.168 == 22.214.171.124.24) in some future extension.
If you could send me an updated version I'll commit it.
More information about the Gnutls-help