File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ use libc:: * ;
2
+ use std:: ptr;
3
+
4
+ use super :: super :: * ;
5
+
6
+ cfg_if ! {
7
+ if #[ cfg( not( ossl300) ) ] {
8
+ pub unsafe fn EVP_PKEY_CTX_set_dh_paramgen_prime_len ( ctx: * mut EVP_PKEY_CTX , len: c_int) -> c_int {
9
+ EVP_PKEY_CTX_ctrl (
10
+ ctx,
11
+ EVP_PKEY_DH ,
12
+ EVP_PKEY_OP_PARAMGEN ,
13
+ EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN ,
14
+ len,
15
+ ptr:: null_mut( ) ,
16
+ )
17
+ }
18
+ pub unsafe fn EVP_PKEY_CTX_set_dh_paramgen_generator ( ctx: * mut EVP_PKEY_CTX , gen : c_int) -> c_int {
19
+ EVP_PKEY_CTX_ctrl (
20
+ ctx,
21
+ EVP_PKEY_DH ,
22
+ EVP_PKEY_OP_PARAMGEN ,
23
+ EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR ,
24
+ gen ,
25
+ ptr:: null_mut( ) ,
26
+ )
27
+ }
28
+ }
29
+ }
30
+
31
+ pub const EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN : c_int = EVP_PKEY_ALG_CTRL + 1 ;
32
+ pub const EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR : c_int = EVP_PKEY_ALG_CTRL + 2 ;
Original file line number Diff line number Diff line change 1
1
use super :: super :: * ;
2
2
3
+ #[ cfg( ossl300) ]
4
+ extern "C" {
5
+ pub fn EVP_PKEY_CTX_set_dh_paramgen_prime_len ( ctx : * mut EVP_PKEY_CTX , len : c_int ) -> c_int ;
6
+ pub fn EVP_PKEY_CTX_set_dh_paramgen_generator ( ctx : * mut EVP_PKEY_CTX , gen : c_int ) -> c_int ;
7
+ }
8
+
3
9
extern "C" {
4
10
pub fn DH_new ( ) -> * mut DH ;
5
11
pub fn DH_free ( dh : * mut DH ) ;
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ mod openssl {
73
73
pub use self :: bn:: * ;
74
74
pub use self :: cms:: * ;
75
75
pub use self :: crypto:: * ;
76
+ pub use self :: dh:: * ;
76
77
pub use self :: dsa:: * ;
77
78
pub use self :: dtls1:: * ;
78
79
pub use self :: ec:: * ;
@@ -104,6 +105,7 @@ mod openssl {
104
105
mod bn;
105
106
mod cms;
106
107
mod crypto;
108
+ mod dh;
107
109
mod dsa;
108
110
mod dtls1;
109
111
mod ec;
You can’t perform that action at this time.
0 commit comments