• 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_free(name: *mut GENERAL_NAME)7     pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME);
8 }
9 
10 #[repr(C)]
11 pub struct ACCESS_DESCRIPTION {
12     pub method: *mut ASN1_OBJECT,
13     pub location: *mut GENERAL_NAME,
14 }
15 
16 stack!(stack_st_ACCESS_DESCRIPTION);
17 
18 extern "C" {
ACCESS_DESCRIPTION_free(ad: *mut ACCESS_DESCRIPTION)19     pub fn ACCESS_DESCRIPTION_free(ad: *mut ACCESS_DESCRIPTION);
20 }
21 
22 #[repr(C)]
23 pub struct AUTHORITY_KEYID {
24     pub keyid: *mut ASN1_OCTET_STRING,
25     pub issuer: *mut stack_st_GENERAL_NAME,
26     pub serial: *mut ASN1_INTEGER,
27 }
28 
29 extern "C" {
AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID)30     pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID);
31 }
32 
33 const_ptr_api! {
34     extern "C" {
35         pub fn X509V3_EXT_nconf_nid(
36             conf: *mut CONF,
37             ctx: *mut X509V3_CTX,
38             ext_nid: c_int,
39             value: #[const_ptr_if(any(ossl110, libressl280))] c_char,
40         ) -> *mut X509_EXTENSION;
41         pub fn X509V3_EXT_nconf(
42             conf: *mut CONF,
43             ctx: *mut X509V3_CTX,
44             name: #[const_ptr_if(any(ossl110, libressl280))] c_char,
45             value: #[const_ptr_if(any(ossl110, libressl280))] c_char,
46         ) -> *mut X509_EXTENSION;
47     }
48 }
49 
50 extern "C" {
X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int51     pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int;
X509_verify(req: *mut X509, pkey: *mut EVP_PKEY) -> c_int52     pub fn X509_verify(req: *mut X509, pkey: *mut EVP_PKEY) -> c_int;
53 
X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF)54     pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF);
55 
X509V3_set_ctx( ctx: *mut X509V3_CTX, issuer: *mut X509, subject: *mut X509, req: *mut X509_REQ, crl: *mut X509_CRL, flags: c_int, )56     pub fn X509V3_set_ctx(
57         ctx: *mut X509V3_CTX,
58         issuer: *mut X509,
59         subject: *mut X509,
60         req: *mut X509_REQ,
61         crl: *mut X509_CRL,
62         flags: c_int,
63     );
64 
X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING65     pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING;
66 }
67 
68 const_ptr_api! {
69     extern "C" {
70         pub fn X509V3_get_d2i(
71             x: #[const_ptr_if(any(ossl110, libressl280))] stack_st_X509_EXTENSION,
72             nid: c_int,
73             crit: *mut c_int,
74             idx: *mut c_int,
75         ) -> *mut c_void;
76         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;
77     }
78 }
79 
80 extern "C" {
X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int81     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_void82     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_EXTENSION83     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_int84     pub fn X509V3_add1_i2d(
85         x: *mut *mut stack_st_X509_EXTENSION,
86         nid: c_int,
87         value: *mut c_void,
88         crit: c_int,
89         flags: c_ulong,
90     ) -> c_int;
X509V3_EXT_print( out: *mut BIO, ext: *mut X509_EXTENSION, flag: c_ulong, indent: c_int, ) -> c_int91     pub fn X509V3_EXT_print(
92         out: *mut BIO,
93         ext: *mut X509_EXTENSION,
94         flag: c_ulong,
95         indent: c_int,
96     ) -> c_int;
97 
98     #[cfg(ossl110)]
X509_get_extension_flags(x: *mut X509) -> u3299     pub fn X509_get_extension_flags(x: *mut X509) -> u32;
100     #[cfg(ossl110)]
X509_get_key_usage(x: *mut X509) -> u32101     pub fn X509_get_key_usage(x: *mut X509) -> u32;
102     #[cfg(ossl110)]
X509_get_extended_key_usage(x: *mut X509) -> u32103     pub fn X509_get_extended_key_usage(x: *mut X509) -> u32;
104 }
105