• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use super::super::*;
2 use libc::*;
3 
4 pub enum CONF_METHOD {}
5 
6 extern "C" {
GENERAL_NAME_new() -> *mut GENERAL_NAME7     pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME;
GENERAL_NAME_free(name: *mut GENERAL_NAME)8     pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME);
GENERAL_NAME_set0_othername( gen: *mut GENERAL_NAME, oid: *mut ASN1_OBJECT, value: *mut ASN1_TYPE, ) -> c_int9     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)]
17 pub struct ACCESS_DESCRIPTION {
18     pub method: *mut ASN1_OBJECT,
19     pub location: *mut GENERAL_NAME,
20 }
21 
22 stack!(stack_st_ACCESS_DESCRIPTION);
23 
24 extern "C" {
ACCESS_DESCRIPTION_free(ad: *mut ACCESS_DESCRIPTION)25     pub fn ACCESS_DESCRIPTION_free(ad: *mut ACCESS_DESCRIPTION);
26 }
27 
28 #[repr(C)]
29 pub 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 
35 extern "C" {
AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID)36     pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID);
37 }
38 
39 const_ptr_api! {
40     extern "C" {
41         pub fn X509V3_EXT_nconf_nid(
42             conf: *mut CONF,
43             ctx: *mut X509V3_CTX,
44             ext_nid: c_int,
45             value: #[const_ptr_if(any(ossl110, libressl280))] c_char,
46         ) -> *mut X509_EXTENSION;
47         pub fn X509V3_EXT_nconf(
48             conf: *mut CONF,
49             ctx: *mut X509V3_CTX,
50             name: #[const_ptr_if(any(ossl110, libressl280))] c_char,
51             value: #[const_ptr_if(any(ossl110, libressl280))] c_char,
52         ) -> *mut X509_EXTENSION;
53     }
54 }
55 
56 extern "C" {
X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int57     pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int;
X509_verify(req: *mut X509, pkey: *mut EVP_PKEY) -> c_int58     pub fn X509_verify(req: *mut X509, pkey: *mut EVP_PKEY) -> c_int;
59 
X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF)60     pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF);
61 
X509V3_set_ctx( ctx: *mut X509V3_CTX, issuer: *mut X509, subject: *mut X509, req: *mut X509_REQ, crl: *mut X509_CRL, flags: c_int, )62     pub fn X509V3_set_ctx(
63         ctx: *mut X509V3_CTX,
64         issuer: *mut X509,
65         subject: *mut X509,
66         req: *mut X509_REQ,
67         crl: *mut X509_CRL,
68         flags: c_int,
69     );
70 
X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING71     pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING;
72 }
73 
74 const_ptr_api! {
75     extern "C" {
76         pub fn X509V3_get_d2i(
77             x: #[const_ptr_if(any(ossl110, libressl280))] stack_st_X509_EXTENSION,
78             nid: c_int,
79             crit: *mut c_int,
80             idx: *mut c_int,
81         ) -> *mut c_void;
82         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;
83     }
84 }
85 
86 extern "C" {
X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int87     pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int;
X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void88     pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void;
X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION89     pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION;
X509V3_add1_i2d( x: *mut *mut stack_st_X509_EXTENSION, nid: c_int, value: *mut c_void, crit: c_int, flags: c_ulong, ) -> c_int90     pub fn X509V3_add1_i2d(
91         x: *mut *mut stack_st_X509_EXTENSION,
92         nid: c_int,
93         value: *mut c_void,
94         crit: c_int,
95         flags: c_ulong,
96     ) -> c_int;
X509V3_EXT_print( out: *mut BIO, ext: *mut X509_EXTENSION, flag: c_ulong, indent: c_int, ) -> c_int97     pub fn X509V3_EXT_print(
98         out: *mut BIO,
99         ext: *mut X509_EXTENSION,
100         flag: c_ulong,
101         indent: c_int,
102     ) -> c_int;
103 
104     #[cfg(ossl110)]
X509_get_pathlen(x: *mut X509) -> c_long105     pub fn X509_get_pathlen(x: *mut X509) -> c_long;
106     #[cfg(ossl110)]
X509_get_extension_flags(x: *mut X509) -> u32107     pub fn X509_get_extension_flags(x: *mut X509) -> u32;
108     #[cfg(ossl110)]
X509_get_key_usage(x: *mut X509) -> u32109     pub fn X509_get_key_usage(x: *mut X509) -> u32;
110     #[cfg(ossl110)]
X509_get_extended_key_usage(x: *mut X509) -> u32111     pub fn X509_get_extended_key_usage(x: *mut X509) -> u32;
112     #[cfg(ossl110)]
X509_get0_subject_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING113     pub fn X509_get0_subject_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
114     #[cfg(ossl110)]
X509_get0_authority_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING115     pub fn X509_get0_authority_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
116     #[cfg(ossl111d)]
X509_get0_authority_issuer(x: *mut X509) -> *const stack_st_GENERAL_NAME117     pub fn X509_get0_authority_issuer(x: *mut X509) -> *const stack_st_GENERAL_NAME;
118     #[cfg(ossl111d)]
X509_get0_authority_serial(x: *mut X509) -> *const ASN1_INTEGER119     pub fn X509_get0_authority_serial(x: *mut X509) -> *const ASN1_INTEGER;
120 }
121 
122 #[repr(C)]
123 pub 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)]
130 pub 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)]
136 pub 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 }
142 stack!(stack_st_DIST_POINT);
143 
144 extern "C" {
DIST_POINT_free(dist_point: *mut DIST_POINT)145     pub fn DIST_POINT_free(dist_point: *mut DIST_POINT);
DIST_POINT_NAME_free(dist_point: *mut DIST_POINT_NAME)146     pub fn DIST_POINT_NAME_free(dist_point: *mut DIST_POINT_NAME);
147 }
148