xref: /dflybsd-src/crypto/libressl/crypto/x509/ext_dat.h (revision 961e30ea7dc61d1112b778ea4981eac68129fb86)
1*de0e0e4dSAntonio Huete Jimenez /* $OpenBSD: ext_dat.h,v 1.4 2021/11/24 19:22:14 tb Exp $ */
28edacedfSDaniel Fojt /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
38edacedfSDaniel Fojt  * project 1999.
48edacedfSDaniel Fojt  */
58edacedfSDaniel Fojt /* ====================================================================
68edacedfSDaniel Fojt  * Copyright (c) 1999-2004 The OpenSSL Project.  All rights reserved.
78edacedfSDaniel Fojt  *
88edacedfSDaniel Fojt  * Redistribution and use in source and binary forms, with or without
98edacedfSDaniel Fojt  * modification, are permitted provided that the following conditions
108edacedfSDaniel Fojt  * are met:
118edacedfSDaniel Fojt  *
128edacedfSDaniel Fojt  * 1. Redistributions of source code must retain the above copyright
138edacedfSDaniel Fojt  *    notice, this list of conditions and the following disclaimer.
148edacedfSDaniel Fojt  *
158edacedfSDaniel Fojt  * 2. Redistributions in binary form must reproduce the above copyright
168edacedfSDaniel Fojt  *    notice, this list of conditions and the following disclaimer in
178edacedfSDaniel Fojt  *    the documentation and/or other materials provided with the
188edacedfSDaniel Fojt  *    distribution.
198edacedfSDaniel Fojt  *
208edacedfSDaniel Fojt  * 3. All advertising materials mentioning features or use of this
218edacedfSDaniel Fojt  *    software must display the following acknowledgment:
228edacedfSDaniel Fojt  *    "This product includes software developed by the OpenSSL Project
238edacedfSDaniel Fojt  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
248edacedfSDaniel Fojt  *
258edacedfSDaniel Fojt  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
268edacedfSDaniel Fojt  *    endorse or promote products derived from this software without
278edacedfSDaniel Fojt  *    prior written permission. For written permission, please contact
288edacedfSDaniel Fojt  *    licensing@OpenSSL.org.
298edacedfSDaniel Fojt  *
308edacedfSDaniel Fojt  * 5. Products derived from this software may not be called "OpenSSL"
318edacedfSDaniel Fojt  *    nor may "OpenSSL" appear in their names without prior written
328edacedfSDaniel Fojt  *    permission of the OpenSSL Project.
338edacedfSDaniel Fojt  *
348edacedfSDaniel Fojt  * 6. Redistributions of any form whatsoever must retain the following
358edacedfSDaniel Fojt  *    acknowledgment:
368edacedfSDaniel Fojt  *    "This product includes software developed by the OpenSSL Project
378edacedfSDaniel Fojt  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
388edacedfSDaniel Fojt  *
398edacedfSDaniel Fojt  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
408edacedfSDaniel Fojt  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
418edacedfSDaniel Fojt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
428edacedfSDaniel Fojt  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
438edacedfSDaniel Fojt  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
448edacedfSDaniel Fojt  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
458edacedfSDaniel Fojt  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
468edacedfSDaniel Fojt  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
478edacedfSDaniel Fojt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
488edacedfSDaniel Fojt  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
498edacedfSDaniel Fojt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
508edacedfSDaniel Fojt  * OF THE POSSIBILITY OF SUCH DAMAGE.
518edacedfSDaniel Fojt  * ====================================================================
528edacedfSDaniel Fojt  *
538edacedfSDaniel Fojt  * This product includes cryptographic software written by Eric Young
548edacedfSDaniel Fojt  * (eay@cryptsoft.com).  This product includes software written by Tim
558edacedfSDaniel Fojt  * Hudson (tjh@cryptsoft.com).
568edacedfSDaniel Fojt  *
578edacedfSDaniel Fojt  */
588edacedfSDaniel Fojt 
598edacedfSDaniel Fojt #include <openssl/opensslconf.h>
608edacedfSDaniel Fojt 
618edacedfSDaniel Fojt __BEGIN_HIDDEN_DECLS
628edacedfSDaniel Fojt 
638edacedfSDaniel Fojt /* This file contains a table of "standard" extensions */
648edacedfSDaniel Fojt 
658edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku;
668edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_pkey_usage_period, v3_sxnet, v3_info, v3_sinfo;
678edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_ns_ia5_list[], v3_alt[], v3_skey_id, v3_akey_id;
688edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_crl_invdate;
698edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_delta_crl, v3_cpols, v3_crld, v3_freshest_crl;
708edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_ocsp_nonce, v3_ocsp_accresp, v3_ocsp_acutoff;
718edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_ocsp_crlid, v3_ocsp_nocheck, v3_ocsp_serviceloc;
728edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_crl_hold, v3_pci;
738edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_policy_mappings, v3_policy_constraints;
748edacedfSDaniel Fojt extern X509V3_EXT_METHOD v3_name_constraints, v3_inhibit_anyp, v3_idp;
75*de0e0e4dSAntonio Huete Jimenez extern const X509V3_EXT_METHOD v3_addr, v3_asid;
76*de0e0e4dSAntonio Huete Jimenez extern const X509V3_EXT_METHOD v3_ct_scts[3];
778edacedfSDaniel Fojt 
788edacedfSDaniel Fojt /* This table will be searched using OBJ_bsearch so it *must* kept in
798edacedfSDaniel Fojt  * order of the ext_nid values.
808edacedfSDaniel Fojt  */
818edacedfSDaniel Fojt 
828edacedfSDaniel Fojt static const X509V3_EXT_METHOD *standard_exts[] = {
838edacedfSDaniel Fojt 	&v3_nscert,
848edacedfSDaniel Fojt 	&v3_ns_ia5_list[0],
858edacedfSDaniel Fojt 	&v3_ns_ia5_list[1],
868edacedfSDaniel Fojt 	&v3_ns_ia5_list[2],
878edacedfSDaniel Fojt 	&v3_ns_ia5_list[3],
888edacedfSDaniel Fojt 	&v3_ns_ia5_list[4],
898edacedfSDaniel Fojt 	&v3_ns_ia5_list[5],
908edacedfSDaniel Fojt 	&v3_ns_ia5_list[6],
918edacedfSDaniel Fojt 	&v3_skey_id,
928edacedfSDaniel Fojt 	&v3_key_usage,
938edacedfSDaniel Fojt 	&v3_pkey_usage_period,
948edacedfSDaniel Fojt 	&v3_alt[0],
958edacedfSDaniel Fojt 	&v3_alt[1],
968edacedfSDaniel Fojt 	&v3_bcons,
978edacedfSDaniel Fojt 	&v3_crl_num,
988edacedfSDaniel Fojt 	&v3_cpols,
998edacedfSDaniel Fojt 	&v3_akey_id,
1008edacedfSDaniel Fojt 	&v3_crld,
1018edacedfSDaniel Fojt 	&v3_ext_ku,
1028edacedfSDaniel Fojt 	&v3_delta_crl,
1038edacedfSDaniel Fojt 	&v3_crl_reason,
1048edacedfSDaniel Fojt #ifndef OPENSSL_NO_OCSP
1058edacedfSDaniel Fojt 	&v3_crl_invdate,
1068edacedfSDaniel Fojt #endif
1078edacedfSDaniel Fojt 	&v3_sxnet,
1088edacedfSDaniel Fojt 	&v3_info,
109*de0e0e4dSAntonio Huete Jimenez #ifndef OPENSSL_NO_RFC3779
110*de0e0e4dSAntonio Huete Jimenez 	&v3_addr,
111*de0e0e4dSAntonio Huete Jimenez 	&v3_asid,
112*de0e0e4dSAntonio Huete Jimenez #endif
1138edacedfSDaniel Fojt #ifndef OPENSSL_NO_OCSP
1148edacedfSDaniel Fojt 	&v3_ocsp_nonce,
1158edacedfSDaniel Fojt 	&v3_ocsp_crlid,
1168edacedfSDaniel Fojt 	&v3_ocsp_accresp,
1178edacedfSDaniel Fojt 	&v3_ocsp_nocheck,
1188edacedfSDaniel Fojt 	&v3_ocsp_acutoff,
1198edacedfSDaniel Fojt 	&v3_ocsp_serviceloc,
1208edacedfSDaniel Fojt #endif
1218edacedfSDaniel Fojt 	&v3_sinfo,
1228edacedfSDaniel Fojt 	&v3_policy_constraints,
1238edacedfSDaniel Fojt #ifndef OPENSSL_NO_OCSP
1248edacedfSDaniel Fojt 	&v3_crl_hold,
1258edacedfSDaniel Fojt #endif
1268edacedfSDaniel Fojt 	&v3_pci,
1278edacedfSDaniel Fojt 	&v3_name_constraints,
1288edacedfSDaniel Fojt 	&v3_policy_mappings,
1298edacedfSDaniel Fojt 	&v3_inhibit_anyp,
1308edacedfSDaniel Fojt 	&v3_idp,
1318edacedfSDaniel Fojt 	&v3_alt[2],
1328edacedfSDaniel Fojt 	&v3_freshest_crl,
133*de0e0e4dSAntonio Huete Jimenez #ifndef OPENSSL_NO_CT
134*de0e0e4dSAntonio Huete Jimenez 	&v3_ct_scts[0],
135*de0e0e4dSAntonio Huete Jimenez 	&v3_ct_scts[1],
136*de0e0e4dSAntonio Huete Jimenez 	&v3_ct_scts[2],
137*de0e0e4dSAntonio Huete Jimenez #endif
1388edacedfSDaniel Fojt };
1398edacedfSDaniel Fojt 
1408edacedfSDaniel Fojt /* Number of standard extensions */
1418edacedfSDaniel Fojt #define STANDARD_EXTENSION_COUNT (sizeof(standard_exts)/sizeof(X509V3_EXT_METHOD *))
1428edacedfSDaniel Fojt 
1438edacedfSDaniel Fojt __END_HIDDEN_DECLS
144