/src/boringssl/crypto/x509/v3_int.cc
Line | Count | Source |
1 | | // Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | // you may not use this file except in compliance with the License. |
5 | | // You may obtain a copy of the License at |
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 | | #include <stdio.h> |
16 | | |
17 | | #include <openssl/obj.h> |
18 | | #include <openssl/x509.h> |
19 | | |
20 | | #include "internal.h" |
21 | | |
22 | | |
23 | | using namespace bssl; |
24 | | |
25 | 505 | static char *i2s_ASN1_INTEGER_cb(const X509V3_EXT_METHOD *method, void *ext) { |
26 | 505 | return i2s_ASN1_INTEGER(method, reinterpret_cast<ASN1_INTEGER *>(ext)); |
27 | 505 | } |
28 | | |
29 | | static void *s2i_asn1_int(const X509V3_EXT_METHOD *meth, const X509V3_CTX *ctx, |
30 | 4 | const char *value) { |
31 | 4 | return s2i_ASN1_INTEGER(meth, value); |
32 | 4 | } |
33 | | |
34 | | const X509V3_EXT_METHOD bssl::v3_crl_num = { |
35 | | NID_crl_number, |
36 | | 0, |
37 | | ASN1_ITEM_ref(ASN1_INTEGER), |
38 | | nullptr, |
39 | | nullptr, |
40 | | nullptr, |
41 | | nullptr, |
42 | | i2s_ASN1_INTEGER_cb, |
43 | | nullptr, |
44 | | nullptr, |
45 | | nullptr, |
46 | | nullptr, |
47 | | nullptr, |
48 | | nullptr, |
49 | | }; |
50 | | |
51 | | const X509V3_EXT_METHOD bssl::v3_delta_crl = { |
52 | | NID_delta_crl, |
53 | | 0, |
54 | | ASN1_ITEM_ref(ASN1_INTEGER), |
55 | | nullptr, |
56 | | nullptr, |
57 | | nullptr, |
58 | | nullptr, |
59 | | i2s_ASN1_INTEGER_cb, |
60 | | nullptr, |
61 | | nullptr, |
62 | | nullptr, |
63 | | nullptr, |
64 | | nullptr, |
65 | | nullptr, |
66 | | }; |
67 | | |
68 | | const X509V3_EXT_METHOD bssl::v3_inhibit_anyp = { |
69 | | NID_inhibit_any_policy, |
70 | | 0, |
71 | | ASN1_ITEM_ref(ASN1_INTEGER), |
72 | | nullptr, |
73 | | nullptr, |
74 | | nullptr, |
75 | | nullptr, |
76 | | i2s_ASN1_INTEGER_cb, |
77 | | s2i_asn1_int, |
78 | | nullptr, |
79 | | nullptr, |
80 | | nullptr, |
81 | | nullptr, |
82 | | nullptr, |
83 | | }; |