Add RFC 3779 support.
[openssl.git] / crypto / x509v3 / v3_purp.c
index 47b7e0f..9d0dd70 100644 (file)
@@ -287,7 +287,12 @@ int X509_supported_extension(X509_EXTENSION *ex)
                NID_key_usage,          /* 83 */
                NID_subject_alt_name,   /* 85 */
                NID_basic_constraints,  /* 87 */
+               NID_certificate_policies, /* 89 */
                NID_ext_key_usage,      /* 126 */
+#ifdef OPENSSL_RFC3779
+               NID_sbgp_ipAddrBlock,   /* 290 */
+               NID_sbgp_autonomousSysNum, /* 291 */
+#endif
                NID_proxyCertInfo       /* 661 */
        };
 
@@ -413,6 +418,11 @@ 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);
        x->crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, NULL, NULL);
+#ifdef OPENSSL_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);
+#endif
        for (i = 0; i < X509_get_ext_count(x); i++)
                {
                ex = X509_get_ext(x, i);