1 /*
2 * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10 #include <stdio.h>
11
12 #include <openssl/obj.h>
13 #include <openssl/x509.h>
14
15 #include "ext_dat.h"
16
17
i2s_ASN1_INTEGER_cb(const X509V3_EXT_METHOD * method,void * ext)18 static char *i2s_ASN1_INTEGER_cb(const X509V3_EXT_METHOD *method, void *ext) {
19 return i2s_ASN1_INTEGER(method, reinterpret_cast<ASN1_INTEGER *>(ext));
20 }
21
s2i_asn1_int(const X509V3_EXT_METHOD * meth,const X509V3_CTX * ctx,const char * value)22 static void *s2i_asn1_int(const X509V3_EXT_METHOD *meth, const X509V3_CTX *ctx,
23 const char *value) {
24 return s2i_ASN1_INTEGER(meth, value);
25 }
26
27 const X509V3_EXT_METHOD v3_crl_num = {
28 NID_crl_number,
29 0,
30 ASN1_ITEM_ref(ASN1_INTEGER),
31 0,
32 0,
33 0,
34 0,
35 i2s_ASN1_INTEGER_cb,
36 0,
37 0,
38 0,
39 0,
40 0,
41 NULL,
42 };
43
44 const X509V3_EXT_METHOD v3_delta_crl = {
45 NID_delta_crl,
46 0,
47 ASN1_ITEM_ref(ASN1_INTEGER),
48 0,
49 0,
50 0,
51 0,
52 i2s_ASN1_INTEGER_cb,
53 0,
54 0,
55 0,
56 0,
57 0,
58 NULL,
59 };
60
61 const X509V3_EXT_METHOD v3_inhibit_anyp = {
62 NID_inhibit_any_policy,
63 0,
64 ASN1_ITEM_ref(ASN1_INTEGER),
65 0,
66 0,
67 0,
68 0,
69 i2s_ASN1_INTEGER_cb,
70 s2i_asn1_int,
71 0,
72 0,
73 0,
74 0,
75 NULL,
76 };
77