Update from HEAD.
[oweals/openssl.git] / crypto / x509v3 / v3_purp.c
index 717c2f3bacc4027a38661e7a422d674df0e8f07e..e18751e01cbcdbca14bc8ed6d6bb0c2c162f1d77 100644 (file)
@@ -1,5 +1,5 @@
 /* v3_purp.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2001.
  */
 /* ====================================================================
@@ -287,11 +287,13 @@ int X509_supported_extension(X509_EXTENSION *ex)
                NID_basic_constraints,  /* 87 */
                NID_certificate_policies, /* 89 */
                NID_ext_key_usage,      /* 126 */
-#ifdef OPENSSL_RFC3779
+#ifndef OPENSSL_NO_RFC3779
                NID_sbgp_ipAddrBlock,   /* 290 */
                NID_sbgp_autonomousSysNum, /* 291 */
 #endif
-               NID_proxyCertInfo       /* 661 */
+               NID_policy_constraints, /* 401 */
+               NID_proxyCertInfo,      /* 661 */
+               NID_inhibit_any_policy  /* 748 */
        };
 
        int ex_nid;
@@ -325,7 +327,7 @@ static void x509v3_cache_extensions(X509 *x)
 #endif
        /* Does subject name match issuer ? */
        if(!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x)))
-                        x->ex_flags |= EXFLAG_SS;
+                        x->ex_flags |= EXFLAG_SI;
        /* V1 should mean no extensions ... */
        if(!X509_get_version(x)) x->ex_flags |= EXFLAG_V1;
        /* Handle basic constraints */
@@ -415,7 +417,7 @@ static void x509v3_cache_extensions(X509 *x)
        }
        x->skid =X509_get_ext_d2i(x, NID_subject_key_identifier, NULL, NULL);
        x->akid =X509_get_ext_d2i(x, NID_authority_key_identifier, NULL, NULL);
-#ifdef OPENSSL_RFC3779
+#ifndef OPENSSL_NO_RFC3779
        x->rfc3779_addr =X509_get_ext_d2i(x, NID_sbgp_ipAddrBlock, NULL, NULL);
        x->rfc3779_asid =X509_get_ext_d2i(x, NID_sbgp_autonomousSysNum,
                                          NULL, NULL);