1 | use libc::*; |
2 | |
3 | use super::super::*; |
4 | |
5 | pub enum PKCS12 {} |
6 | |
7 | extern "C" { |
8 | pub fn PKCS12_free(p12: *mut PKCS12); |
9 | } |
10 | const_ptr_api! { |
11 | extern "C" { |
12 | pub fn i2d_PKCS12(a: #[const_ptr_if(ossl300)] PKCS12, buf: *mut *mut u8) -> c_int; |
13 | } |
14 | } |
15 | extern "C" { |
16 | pub fn d2i_PKCS12(a: *mut *mut PKCS12, pp: *mut *const u8, length: c_long) -> *mut PKCS12; |
17 | |
18 | pub fn PKCS12_parse( |
19 | p12: *mut PKCS12, |
20 | pass: *const c_char, |
21 | pkey: *mut *mut EVP_PKEY, |
22 | cert: *mut *mut X509, |
23 | ca: *mut *mut stack_st_X509, |
24 | ) -> c_int; |
25 | |
26 | pub fn PKCS12_set_mac( |
27 | p12: *mut PKCS12, |
28 | pass: *const c_char, |
29 | passlen: c_int, |
30 | salt: *mut c_uchar, |
31 | saltlen: c_int, |
32 | iter: c_int, |
33 | md_type: *const EVP_MD, |
34 | ) -> c_int; |
35 | } |
36 | const_ptr_api! { |
37 | extern "C" { |
38 | pub fn PKCS12_create( |
39 | pass: #[const_ptr_if(any(ossl110, libressl280))] c_char, |
40 | friendly_name: #[const_ptr_if(any(ossl110, libressl280))] c_char, |
41 | pkey: *mut EVP_PKEY, |
42 | cert: *mut X509, |
43 | ca: *mut stack_st_X509, |
44 | nid_key: c_int, |
45 | nid_cert: c_int, |
46 | iter: c_int, |
47 | mac_iter: c_int, |
48 | keytype: c_int, |
49 | ) -> *mut PKCS12; |
50 | |
51 | pub fn i2d_PKCS12_bio(b: *mut BIO, a: #[const_ptr_if(ossl300)] PKCS12) -> c_int; |
52 | } |
53 | } |
54 | |