Loading openssl-sys/src/dh.rs 0 → 100644 +32 −0 Original line number Diff line number Diff line use libc::*; use std::ptr; use super::super::*; cfg_if! { if #[cfg(not(ossl300))] { pub unsafe fn EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx: *mut EVP_PKEY_CTX, len: c_int) -> c_int { EVP_PKEY_CTX_ctrl( ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, ptr::null_mut(), ) } pub unsafe fn EVP_PKEY_CTX_set_dh_paramgen_generator(ctx: *mut EVP_PKEY_CTX, gen: c_int) -> c_int { EVP_PKEY_CTX_ctrl( ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, ptr::null_mut(), ) } } } pub const EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN: c_int = EVP_PKEY_ALG_CTRL + 1; pub const EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR: c_int = EVP_PKEY_ALG_CTRL + 2; openssl-sys/src/handwritten/dh.rs +6 −0 Original line number Diff line number Diff line use super::super::*; #[cfg(ossl300)] extern "C" { pub fn EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx: *mut EVP_PKEY_CTX, len: c_int) -> c_int; pub fn EVP_PKEY_CTX_set_dh_paramgen_generator(ctx: *mut EVP_PKEY_CTX, gen: c_int) -> c_int; } extern "C" { pub fn DH_new() -> *mut DH; pub fn DH_free(dh: *mut DH); Loading openssl-sys/src/lib.rs +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ mod openssl { pub use self::bn::*; pub use self::cms::*; pub use self::crypto::*; pub use self::dh::*; pub use self::dsa::*; pub use self::dtls1::*; pub use self::ec::*; Loading Loading @@ -104,6 +105,7 @@ mod openssl { mod bn; mod cms; mod crypto; mod dh; mod dsa; mod dtls1; mod ec; Loading Loading
openssl-sys/src/dh.rs 0 → 100644 +32 −0 Original line number Diff line number Diff line use libc::*; use std::ptr; use super::super::*; cfg_if! { if #[cfg(not(ossl300))] { pub unsafe fn EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx: *mut EVP_PKEY_CTX, len: c_int) -> c_int { EVP_PKEY_CTX_ctrl( ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, ptr::null_mut(), ) } pub unsafe fn EVP_PKEY_CTX_set_dh_paramgen_generator(ctx: *mut EVP_PKEY_CTX, gen: c_int) -> c_int { EVP_PKEY_CTX_ctrl( ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, ptr::null_mut(), ) } } } pub const EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN: c_int = EVP_PKEY_ALG_CTRL + 1; pub const EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR: c_int = EVP_PKEY_ALG_CTRL + 2;
openssl-sys/src/handwritten/dh.rs +6 −0 Original line number Diff line number Diff line use super::super::*; #[cfg(ossl300)] extern "C" { pub fn EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx: *mut EVP_PKEY_CTX, len: c_int) -> c_int; pub fn EVP_PKEY_CTX_set_dh_paramgen_generator(ctx: *mut EVP_PKEY_CTX, gen: c_int) -> c_int; } extern "C" { pub fn DH_new() -> *mut DH; pub fn DH_free(dh: *mut DH); Loading
openssl-sys/src/lib.rs +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ mod openssl { pub use self::bn::*; pub use self::cms::*; pub use self::crypto::*; pub use self::dh::*; pub use self::dsa::*; pub use self::dtls1::*; pub use self::ec::*; Loading Loading @@ -104,6 +105,7 @@ mod openssl { mod bn; mod cms; mod crypto; mod dh; mod dsa; mod dtls1; mod ec; Loading