File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ use super::*;
5
5
6
6
pub const OPENSSL_EC_NAMED_CURVE : c_int = 1 ;
7
7
8
+ cfg_if ! {
9
+ if #[ cfg( not( ossl300) ) ] {
10
+ pub unsafe fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid ( ctx: * mut EVP_PKEY_CTX , nid: c_int) -> c_int {
11
+ EVP_PKEY_CTX_ctrl (
12
+ ctx,
13
+ EVP_PKEY_EC ,
14
+ EVP_PKEY_OP_PARAMGEN |EVP_PKEY_OP_KEYGEN ,
15
+ EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID ,
16
+ nid,
17
+ ptr:: null_mut( ) ,
18
+ )
19
+ }
20
+ }
21
+ }
8
22
#[ cfg( ossl300) ]
9
23
pub unsafe fn EVP_EC_gen ( curve : * const c_char ) -> * mut EVP_PKEY {
10
24
EVP_PKEY_Q_keygen (
@@ -14,3 +28,5 @@ pub unsafe fn EVP_EC_gen(curve: *const c_char) -> *mut EVP_PKEY {
14
28
curve,
15
29
)
16
30
}
31
+
32
+ pub const EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID : c_int = EVP_PKEY_ALG_CTRL + 1 ;
Original file line number Diff line number Diff line change 1
1
use super :: super :: * ;
2
2
use libc:: * ;
3
3
4
+ #[ cfg( ossl300) ]
5
+ extern "C" {
6
+ pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid ( ctx : * mut EVP_PKEY_CTX , nid : c_int ) -> c_int ;
7
+ }
8
+
4
9
#[ repr( C ) ]
5
10
#[ derive( Copy , Clone ) ]
6
11
pub enum point_conversion_form_t {
You can’t perform that action at this time.
0 commit comments