diff options
| author | Steven Fackler <[email protected]> | 2016-08-08 20:26:04 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-08-08 20:26:04 -0700 |
| commit | bf07dd9a4e4d0b1d7c003ec68dc92135a642fd5a (patch) | |
| tree | b6996cc9441c326de1e226b32692d61358a0f4df /openssl-sys | |
| parent | Clean up RSA and DSA accessors (diff) | |
| download | rust-openssl-bf07dd9a4e4d0b1d7c003ec68dc92135a642fd5a.tar.xz rust-openssl-bf07dd9a4e4d0b1d7c003ec68dc92135a642fd5a.zip | |
Remove symm_internal
Diffstat (limited to 'openssl-sys')
| -rw-r--r-- | openssl-sys/src/lib.rs | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 58b78d9f..6d2090ca 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -16,12 +16,12 @@ use std::sync::{Once, ONCE_INIT}; pub type ASN1_INTEGER = c_void; pub type ASN1_STRING = c_void; pub type ASN1_TIME = c_void; +pub type ASN1_TYPE = c_void; pub type BN_CTX = c_void; pub type BN_GENCB = c_void; pub type COMP_METHOD = c_void; pub type DH = c_void; pub type ENGINE = c_void; -pub type EVP_CIPHER = c_void; pub type EVP_CIPHER_CTX = c_void; pub type EVP_MD = c_void; pub type EVP_PKEY_CTX = c_void; @@ -197,6 +197,39 @@ impl Clone for EVP_MD_CTX { } #[repr(C)] +pub struct EVP_CIPHER { + pub nid: c_int, + pub block_size: c_int, + pub key_len: c_int, + pub iv_len: c_int, + pub flags: c_ulong, + pub init: Option<unsafe extern "C" fn(*mut EVP_CIPHER_CTX, + *mut c_uchar, + *const c_uchar, + size_t) -> c_int>, + pub do_cipher: Option<unsafe extern "C" fn(*mut EVP_CIPHER_CTX, + *mut c_uchar, + *const c_uchar, + size_t) -> c_int>, + pub cleanup: Option<unsafe extern "C" fn(*mut EVP_CIPHER_CTX) -> c_int>, + pub ctx_size: c_int, + pub set_asn1_parameters: Option<unsafe extern "C" fn(*mut EVP_CIPHER_CTX, + *mut ASN1_TYPE) -> c_int>, + pub get_asn1_parameters: Option<unsafe extern "C" fn(*mut EVP_CIPHER_CTX, + *mut ASN1_TYPE) -> c_int>, + pub ctrl: Option<unsafe extern "C" fn(*mut EVP_CIPHER_CTX, + c_int, + c_int, + *mut c_void) -> c_int>, + pub app_data: *mut c_void, +} + +impl Copy for EVP_CIPHER {} +impl Clone for EVP_CIPHER { + fn clone(&self) -> EVP_CIPHER { *self } +} + +#[repr(C)] pub struct HMAC_CTX { md: *mut EVP_MD, md_ctx: EVP_MD_CTX, |