| 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 "ext_dat.h" |
| 21 |
| 22 |
| 23 | static char *i2s_ASN1_INTEGER_cb(const X509V3_EXT_METHOD *method, void *ext) { |
| 24 | return i2s_ASN1_INTEGER(method, reinterpret_cast<ASN1_INTEGER *>(ext)); |
| 25 | } |
| 26 |
| 27 | static void *s2i_asn1_int(const X509V3_EXT_METHOD *meth, const X509V3_CTX *ctx, |
| 28 | const char *value) { |
| 29 | return s2i_ASN1_INTEGER(meth, value); |
| 30 | } |
| 31 |
| 32 | const X509V3_EXT_METHOD v3_crl_num = { |
| 33 | NID_crl_number, |
| 34 | 0, |
| 35 | ASN1_ITEM_ref(ASN1_INTEGER), |
| 36 | 0, |
| 37 | 0, |
| 38 | 0, |
| 39 | 0, |
| 40 | i2s_ASN1_INTEGER_cb, |
| 41 | 0, |
| 42 | 0, |
| 43 | 0, |
| 44 | 0, |
| 45 | 0, |
| 46 | NULL, |
| 47 | }; |
| 48 |
| 49 | const X509V3_EXT_METHOD v3_delta_crl = { |
| 50 | NID_delta_crl, |
| 51 | 0, |
| 52 | ASN1_ITEM_ref(ASN1_INTEGER), |
| 53 | 0, |
| 54 | 0, |
| 55 | 0, |
| 56 | 0, |
| 57 | i2s_ASN1_INTEGER_cb, |
| 58 | 0, |
| 59 | 0, |
| 60 | 0, |
| 61 | 0, |
| 62 | 0, |
| 63 | NULL, |
| 64 | }; |
| 65 |
| 66 | const X509V3_EXT_METHOD v3_inhibit_anyp = { |
| 67 | NID_inhibit_any_policy, |
| 68 | 0, |
| 69 | ASN1_ITEM_ref(ASN1_INTEGER), |
| 70 | 0, |
| 71 | 0, |
| 72 | 0, |
| 73 | 0, |
| 74 | i2s_ASN1_INTEGER_cb, |
| 75 | s2i_asn1_int, |
| 76 | 0, |
| 77 | 0, |
| 78 | 0, |
| 79 | 0, |
| 80 | NULL, |
| 81 | }; |
| 82 |