Skip to main content

variant_ssl_sys/handwritten/
params.rs

1use super::super::*;
2use libc::size_t;
3use std::ffi::{c_char, c_int, c_uint, c_void};
4
5#[cfg(ossl300)]
6extern "C" {
7    pub fn OSSL_PARAM_free(p: *mut OSSL_PARAM);
8    pub fn OSSL_PARAM_dup(params: *const OSSL_PARAM) -> *mut OSSL_PARAM;
9    pub fn OSSL_PARAM_merge(
10        params: *const OSSL_PARAM,
11        params1: *const OSSL_PARAM,
12    ) -> *mut OSSL_PARAM;
13    pub fn OSSL_PARAM_construct_uint(key: *const c_char, buf: *mut c_uint) -> OSSL_PARAM;
14    pub fn OSSL_PARAM_construct_end() -> OSSL_PARAM;
15    pub fn OSSL_PARAM_construct_utf8_string(
16        key: *const c_char,
17        buf: *mut c_char,
18        bsize: usize,
19    ) -> OSSL_PARAM;
20    pub fn OSSL_PARAM_construct_octet_string(
21        key: *const c_char,
22        buf: *mut c_void,
23        bsize: usize,
24    ) -> OSSL_PARAM;
25
26    pub fn OSSL_PARAM_modified(p: *const OSSL_PARAM) -> c_int;
27
28    pub fn OSSL_PARAM_locate(p: *mut OSSL_PARAM, key: *const c_char) -> *mut OSSL_PARAM;
29    pub fn OSSL_PARAM_locate_const(
30        params: *const OSSL_PARAM,
31        key: *const c_char,
32    ) -> *const OSSL_PARAM;
33    pub fn OSSL_PARAM_get_BN(p: *const OSSL_PARAM, val: *mut *mut BIGNUM) -> c_int;
34    pub fn OSSL_PARAM_get_utf8_string(
35        p: *const OSSL_PARAM,
36        val: *mut *mut c_char,
37        max_len: usize,
38    ) -> c_int;
39    pub fn OSSL_PARAM_get_utf8_string_ptr(p: *const OSSL_PARAM, val: *mut *const c_char) -> c_int;
40    pub fn OSSL_PARAM_get_octet_string(
41        p: *const OSSL_PARAM,
42        val: *mut *mut c_void,
43        max_len: usize,
44        used_len: *mut usize,
45    ) -> c_int;
46    pub fn OSSL_PARAM_get_octet_string_ptr(
47        p: *const OSSL_PARAM,
48        val: *mut *const c_void,
49        used_len: *mut usize,
50    ) -> c_int;
51
52    pub fn OSSL_PARAM_BLD_new() -> *mut OSSL_PARAM_BLD;
53    pub fn OSSL_PARAM_BLD_free(bld: *mut OSSL_PARAM_BLD);
54    pub fn OSSL_PARAM_BLD_to_param(bld: *mut OSSL_PARAM_BLD) -> *mut OSSL_PARAM;
55    pub fn OSSL_PARAM_BLD_push_int(
56        bld: *mut OSSL_PARAM_BLD,
57        key: *const c_char,
58        val: c_int,
59    ) -> c_int;
60    pub fn OSSL_PARAM_BLD_push_uint(
61        bld: *mut OSSL_PARAM_BLD,
62        key: *const c_char,
63        val: c_uint,
64    ) -> c_int;
65    pub fn OSSL_PARAM_BLD_push_size_t(
66        bld: *mut OSSL_PARAM_BLD,
67        key: *const c_char,
68        val: size_t,
69    ) -> c_int;
70    pub fn OSSL_PARAM_BLD_push_BN(
71        bld: *mut OSSL_PARAM_BLD,
72        key: *const c_char,
73        bn: *const BIGNUM,
74    ) -> c_int;
75    pub fn OSSL_PARAM_BLD_push_BN_pad(
76        bld: *mut OSSL_PARAM_BLD,
77        key: *const c_char,
78        bn: *const BIGNUM,
79        sz: size_t,
80    ) -> c_int;
81    pub fn OSSL_PARAM_BLD_push_utf8_string(
82        bld: *mut OSSL_PARAM_BLD,
83        key: *const c_char,
84        buf: *const c_char,
85        bsize: size_t,
86    ) -> c_int;
87    pub fn OSSL_PARAM_BLD_push_utf8_ptr(
88        bld: *mut OSSL_PARAM_BLD,
89        key: *const c_char,
90        buf: *mut c_char,
91        bsize: size_t,
92    ) -> c_int;
93    pub fn OSSL_PARAM_BLD_push_octet_string(
94        bld: *mut OSSL_PARAM_BLD,
95        key: *const c_char,
96        buf: *const c_void,
97        bsize: size_t,
98    ) -> c_int;
99    pub fn OSSL_PARAM_BLD_push_octet_ptr(
100        bld: *mut OSSL_PARAM_BLD,
101        key: *const c_char,
102        buf: *mut c_void,
103        bsize: size_t,
104    ) -> c_int;
105}