variant_ssl_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 pub fn GENERAL_NAME_set0_othername(
10 gen: *mut GENERAL_NAME,
11 oid: *mut ASN1_OBJECT,
12 value: *mut ASN1_TYPE,
13 ) -> c_int;
14}
15
16#[repr(C)]
17pub struct ACCESS_DESCRIPTION {
18 pub method: *mut ASN1_OBJECT,
19 pub location: *mut GENERAL_NAME,
20}
21
22stack!(stack_st_ACCESS_DESCRIPTION);
23
24extern "C" {
25 pub fn ACCESS_DESCRIPTION_free(ad: *mut ACCESS_DESCRIPTION);
26}
27
28#[repr(C)]
29pub struct AUTHORITY_KEYID {
30 pub keyid: *mut ASN1_OCTET_STRING,
31 pub issuer: *mut stack_st_GENERAL_NAME,
32 pub serial: *mut ASN1_INTEGER,
33}
34
35extern "C" {
36 pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID);
37}
38
39extern "C" {
40 pub fn X509V3_EXT_nconf_nid(
41 conf: *mut CONF,
42 ctx: *mut X509V3_CTX,
43 ext_nid: c_int,
44 value: *const c_char,
45 ) -> *mut X509_EXTENSION;
46 pub fn X509V3_EXT_nconf(
47 conf: *mut CONF,
48 ctx: *mut X509V3_CTX,
49 name: *const c_char,
50 value: *const c_char,
51 ) -> *mut X509_EXTENSION;
52}
53
54extern "C" {
55 pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int;
56 pub fn X509_verify(req: *mut X509, pkey: *mut EVP_PKEY) -> c_int;
57
58 pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF);
59
60 pub fn X509V3_set_ctx(
61 ctx: *mut X509V3_CTX,
62 issuer: *mut X509,
63 subject: *mut X509,
64 req: *mut X509_REQ,
65 crl: *mut X509_CRL,
66 flags: c_int,
67 );
68
69 pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING;
70}
71
72extern "C" {
73 pub fn X509V3_get_d2i(
74 x: *const stack_st_X509_EXTENSION,
75 nid: c_int,
76 crit: *mut c_int,
77 idx: *mut c_int,
78 ) -> *mut c_void;
79 pub fn X509V3_extensions_print(
80 out: *mut BIO,
81 title: *const c_char,
82 exts: *const stack_st_X509_EXTENSION,
83 flag: c_ulong,
84 indent: c_int,
85 ) -> c_int;
86}
87
88extern "C" {
89 #[cfg(not(libressl390))]
90 pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int;
91 pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void;
92 pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION;
93 pub fn X509V3_add1_i2d(
94 x: *mut *mut stack_st_X509_EXTENSION,
95 nid: c_int,
96 value: *mut c_void,
97 crit: c_int,
98 flags: c_ulong,
99 ) -> c_int;
100 pub fn X509V3_EXT_print(
101 out: *mut BIO,
102 ext: *mut X509_EXTENSION,
103 flag: c_ulong,
104 indent: c_int,
105 ) -> c_int;
106
107 #[cfg(ossl110)]
108 pub fn X509_get_pathlen(x: *mut X509) -> c_long;
109 #[cfg(ossl110)]
110 pub fn X509_get_extension_flags(x: *mut X509) -> u32;
111 pub fn X509_get_key_usage(x: *mut X509) -> u32;
112 #[cfg(ossl110)]
113 pub fn X509_get_extended_key_usage(x: *mut X509) -> u32;
114 #[cfg(ossl110)]
115 pub fn X509_get0_subject_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
116 #[cfg(ossl110)]
117 pub fn X509_get0_authority_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
118 #[cfg(ossl111d)]
119 pub fn X509_get0_authority_issuer(x: *mut X509) -> *const stack_st_GENERAL_NAME;
120 #[cfg(ossl111d)]
121 pub fn X509_get0_authority_serial(x: *mut X509) -> *const ASN1_INTEGER;
122}
123
124#[repr(C)]
125pub struct DIST_POINT_NAME {
126 pub type_: c_int,
127 pub name: DIST_POINT_NAME_st_anon_union,
128 pub dpname: *mut X509_NAME,
129}
130
131#[repr(C)]
132pub union DIST_POINT_NAME_st_anon_union {
133 pub fullname: *mut stack_st_GENERAL_NAME,
134 pub relativename: *mut stack_st_X509_NAME_ENTRY,
135}
136
137#[repr(C)]
138pub struct DIST_POINT {
139 pub distpoint: *mut DIST_POINT_NAME,
140 pub reasons: *mut ASN1_BIT_STRING,
141 pub CRLissuer: *mut stack_st_GENERAL_NAME,
142 pub dp_reasons: c_int,
143}
144stack!(stack_st_DIST_POINT);
145
146extern "C" {
147 pub fn DIST_POINT_free(dist_point: *mut DIST_POINT);
148 pub fn DIST_POINT_NAME_free(dist_point: *mut DIST_POINT_NAME);
149}
150
151#[repr(C)]
152pub struct BASIC_CONSTRAINTS {
153 pub ca: c_int,
154 pub pathlen: *mut ASN1_INTEGER,
155}
156
157extern "C" {
158 pub fn BASIC_CONSTRAINTS_free(bs: *mut BASIC_CONSTRAINTS);
159}
160
161#[cfg(ossl110)]
162extern "C" {
163 pub fn X509_check_host(
164 x: *mut X509,
165 chk: *const c_char,
166 chklen: usize,
167 flags: c_uint,
168 peername: *mut *mut c_char,
169 ) -> c_int;
170 pub fn X509_check_email(
171 x: *mut X509,
172 chk: *const c_char,
173 chklen: usize,
174 flags: c_uint,
175 ) -> c_int;
176 pub fn X509_check_ip(x: *mut X509, chk: *const c_uchar, chklen: usize, flags: c_uint) -> c_int;
177 pub fn X509_check_ip_asc(x: *mut X509, ipasc: *const c_char, flags: c_uint) -> c_int;
178}