| 6 | // |
| 7 | // https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 |
| 15 | // This file contains a table of "standard" extensions |
| 16 |
| 17 | #if defined(__cplusplus) |
| 18 | extern "C" { |
| 19 | #endif |
| 20 |
| 21 | extern const X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku; |
| 22 | extern const X509V3_EXT_METHOD v3_info, v3_sinfo; |
| 23 | extern const X509V3_EXT_METHOD v3_ns_ia5_list[], v3_alt[], v3_skey_id, |
| 24 | v3_akey_id; |
| 25 | extern const X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_crl_invdate; |
| 26 | extern const X509V3_EXT_METHOD v3_delta_crl, v3_cpols, v3_crld, v3_freshest_crl; |
| 27 | extern const X509V3_EXT_METHOD v3_ocsp_nonce, v3_ocsp_accresp, v3_ocsp_acutoff; |
| 28 | extern const X509V3_EXT_METHOD v3_ocsp_crlid, v3_ocsp_nocheck, |
| 29 | v3_ocsp_serviceloc; |
| 30 | extern const X509V3_EXT_METHOD v3_crl_hold; |
| 31 | extern const X509V3_EXT_METHOD v3_policy_mappings, v3_policy_constraints; |
| 32 | extern const X509V3_EXT_METHOD v3_name_constraints, v3_inhibit_anyp, v3_idp; |
| 33 | extern const X509V3_EXT_METHOD v3_addr, v3_asid; |
| 34 |
| 35 | // This table will be searched using OBJ_bsearch so it *must* kept in order |
| 36 | // of the ext_nid values. |
| 37 |
| 38 | // TODO(fork): OCSP support |
| 39 | #define OPENSSL_NO_OCSP |
| 40 |
| 41 | static const X509V3_EXT_METHOD *const standard_exts[] = { |
| 42 | &v3_nscert, |
| 43 | &v3_ns_ia5_list[0], |
| 44 | &v3_ns_ia5_list[1], |
| 45 | &v3_ns_ia5_list[2], |
| 46 | &v3_ns_ia5_list[3], |
| 47 | &v3_ns_ia5_list[4], |
| 48 | &v3_ns_ia5_list[5], |
| 49 | &v3_ns_ia5_list[6], |
| 50 | &v3_skey_id, |
| 51 | &v3_key_usage, |
| 52 | &v3_alt[0], |
| 53 | &v3_alt[1], |
| 54 | &v3_bcons, |
| 55 | &v3_crl_num, |
| 56 | &v3_cpols, |
| 57 | &v3_akey_id, |
| 58 | &v3_crld, |
| 59 | &v3_ext_ku, |
| 60 | &v3_delta_crl, |
| 61 | &v3_crl_reason, |
| 62 | &v3_crl_invdate, |
| 63 | &v3_info, |
| 64 | #ifndef OPENSSL_NO_OCSP |
| 65 | &v3_ocsp_nonce, |
| 66 | &v3_ocsp_crlid, |
| 67 | &v3_ocsp_accresp, |
| 68 | &v3_ocsp_acutoff, |
| 69 | &v3_ocsp_serviceloc, |
| 70 | #endif |
| 71 | &v3_ocsp_nocheck, |
| 72 | &v3_sinfo, |
| 73 | &v3_policy_constraints, |
| 74 | #ifndef OPENSSL_NO_OCSP |
| 75 | &v3_crl_hold, |
| 76 | #endif |
| 77 | &v3_name_constraints, |
| 78 | &v3_policy_mappings, |
| 79 | &v3_inhibit_anyp, |
| 80 | &v3_idp, |
| 81 | &v3_alt[2], |
| 82 | &v3_freshest_crl, |
| 83 | }; |
| 84 |
| 85 | // Number of standard extensions |
| 86 |
| 87 | #define STANDARD_EXTENSION_COUNT \ |
| 88 | (sizeof(standard_exts) / sizeof(X509V3_EXT_METHOD *)) |
| 89 |
| 90 | #if defined(__cplusplus) |
| 91 | } // extern C |
| 92 | #endif |
| 93 |