variant_ssl_sys/handwritten/
x509v3.rs1use super::super::*;
2use std::ffi::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void};
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 pub fn X509_get_extension_flags(x: *mut X509) -> u32;
110 pub fn X509_get_key_usage(x: *mut X509) -> u32;
111 pub fn X509_get_extended_key_usage(x: *mut X509) -> u32;
112 #[cfg(ossl110)]
113 pub fn X509_get0_subject_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
114 #[cfg(ossl110)]
115 pub fn X509_get0_authority_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
116 #[cfg(ossl111d)]
117 pub fn X509_get0_authority_issuer(x: *mut X509) -> *const stack_st_GENERAL_NAME;
118 #[cfg(ossl111d)]
119 pub fn X509_get0_authority_serial(x: *mut X509) -> *const ASN1_INTEGER;
120}
121
122#[repr(C)]
123pub struct DIST_POINT_NAME {
124 pub type_: c_int,
125 pub name: DIST_POINT_NAME_st_anon_union,
126 pub dpname: *mut X509_NAME,
127}
128
129#[repr(C)]
130pub union DIST_POINT_NAME_st_anon_union {
131 pub fullname: *mut stack_st_GENERAL_NAME,
132 pub relativename: *mut stack_st_X509_NAME_ENTRY,
133}
134
135#[repr(C)]
136pub struct DIST_POINT {
137 pub distpoint: *mut DIST_POINT_NAME,
138 pub reasons: *mut ASN1_BIT_STRING,
139 pub CRLissuer: *mut stack_st_GENERAL_NAME,
140 pub dp_reasons: c_int,
141}
142stack!(stack_st_DIST_POINT);
143
144extern "C" {
145 pub fn DIST_POINT_free(dist_point: *mut DIST_POINT);
146 pub fn DIST_POINT_NAME_free(dist_point: *mut DIST_POINT_NAME);
147}
148
149#[repr(C)]
150pub struct BASIC_CONSTRAINTS {
151 pub ca: c_int,
152 pub pathlen: *mut ASN1_INTEGER,
153}
154
155extern "C" {
156 pub fn BASIC_CONSTRAINTS_free(bs: *mut BASIC_CONSTRAINTS);
157}
158
159#[cfg(ossl110)]
160extern "C" {
161 pub fn X509_check_host(
162 x: *mut X509,
163 chk: *const c_char,
164 chklen: usize,
165 flags: c_uint,
166 peername: *mut *mut c_char,
167 ) -> c_int;
168 pub fn X509_check_email(
169 x: *mut X509,
170 chk: *const c_char,
171 chklen: usize,
172 flags: c_uint,
173 ) -> c_int;
174 pub fn X509_check_ip(x: *mut X509, chk: *const c_uchar, chklen: usize, flags: c_uint) -> c_int;
175 pub fn X509_check_ip_asc(x: *mut X509, ipasc: *const c_char, flags: c_uint) -> c_int;
176}