gmssl_sys/handwritten/
x509v3.rs1use super::super::*;
2use libc::*;
3
4pub enum CONF_METHOD {}
5
6extern "C" {
7 pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME;
8 pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME);
9}
10
11#[repr(C)]
12pub struct ACCESS_DESCRIPTION {
13 pub method: *mut ASN1_OBJECT,
14 pub location: *mut GENERAL_NAME,
15}
16
17stack!(stack_st_ACCESS_DESCRIPTION);
18
19extern "C" {
20 pub fn ACCESS_DESCRIPTION_free(ad: *mut ACCESS_DESCRIPTION);
21}
22
23#[repr(C)]
24pub struct AUTHORITY_KEYID {
25 pub keyid: *mut ASN1_OCTET_STRING,
26 pub issuer: *mut stack_st_GENERAL_NAME,
27 pub serial: *mut ASN1_INTEGER,
28}
29
30extern "C" {
31 pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID);
32}
33
34const_ptr_api! {
35 extern "C" {
36 pub fn X509V3_EXT_nconf_nid(
37 conf: *mut CONF,
38 ctx: *mut X509V3_CTX,
39 ext_nid: c_int,
40 value: #[const_ptr_if(any(ossl110, libressl280))] c_char,
41 ) -> *mut X509_EXTENSION;
42 pub fn X509V3_EXT_nconf(
43 conf: *mut CONF,
44 ctx: *mut X509V3_CTX,
45 name: #[const_ptr_if(any(ossl110, libressl280))] c_char,
46 value: #[const_ptr_if(any(ossl110, libressl280))] c_char,
47 ) -> *mut X509_EXTENSION;
48 }
49}
50
51extern "C" {
52 pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int;
53 pub fn X509_verify(req: *mut X509, pkey: *mut EVP_PKEY) -> c_int;
54
55 pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF);
56
57 pub fn X509V3_set_ctx(
58 ctx: *mut X509V3_CTX,
59 issuer: *mut X509,
60 subject: *mut X509,
61 req: *mut X509_REQ,
62 crl: *mut X509_CRL,
63 flags: c_int,
64 );
65
66 pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING;
67}
68
69const_ptr_api! {
70 extern "C" {
71 pub fn X509V3_get_d2i(
72 x: #[const_ptr_if(any(ossl110, libressl280))] stack_st_X509_EXTENSION,
73 nid: c_int,
74 crit: *mut c_int,
75 idx: *mut c_int,
76 ) -> *mut c_void;
77 pub fn X509V3_extensions_print(out: *mut BIO, title: #[const_ptr_if(any(ossl110, libressl280))] c_char, exts: #[const_ptr_if(any(ossl110, libressl280))] stack_st_X509_EXTENSION, flag: c_ulong, indent: c_int) -> c_int;
78 }
79}
80
81extern "C" {
82 pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int;
83 pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void;
84 pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION;
85 pub fn X509V3_add1_i2d(
86 x: *mut *mut stack_st_X509_EXTENSION,
87 nid: c_int,
88 value: *mut c_void,
89 crit: c_int,
90 flags: c_ulong,
91 ) -> c_int;
92 pub fn X509V3_EXT_print(
93 out: *mut BIO,
94 ext: *mut X509_EXTENSION,
95 flag: c_ulong,
96 indent: c_int,
97 ) -> c_int;
98
99 #[cfg(ossl110)]
100 pub fn X509_get_extension_flags(x: *mut X509) -> u32;
101 #[cfg(ossl110)]
102 pub fn X509_get_key_usage(x: *mut X509) -> u32;
103 #[cfg(ossl110)]
104 pub fn X509_get_extended_key_usage(x: *mut X509) -> u32;
105}
106
107#[repr(C)]
108pub struct DIST_POINT_NAME {
109 pub type_: c_int,
110 pub name: DIST_POINT_NAME_st_anon_union,
111 pub dpname: *mut X509_NAME,
112}
113
114#[repr(C)]
115pub union DIST_POINT_NAME_st_anon_union {
116 pub fullname: *mut stack_st_GENERAL_NAME,
117 pub relativename: *mut stack_st_X509_NAME_ENTRY,
118}
119
120#[repr(C)]
121pub struct DIST_POINT {
122 pub distpoint: *mut DIST_POINT_NAME,
123 pub reasons: *mut ASN1_BIT_STRING,
124 pub CRLissuer: *mut stack_st_GENERAL_NAME,
125 pub dp_reasons: c_int,
126}
127stack!(stack_st_DIST_POINT);
128
129extern "C" {
130 pub fn DIST_POINT_free(dist_point: *mut DIST_POINT);
131 pub fn DIST_POINT_NAME_free(dist_point: *mut DIST_POINT_NAME);
132}