Loading openssl-sys-extras/src/lib.rs +3 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ extern { #[cfg_attr(not(target_os = "nacl"), link_name = "HMAC_Update_shim")] pub fn HMAC_Update(ctx: *mut HMAC_CTX, input: *const u8, len: c_uint) -> c_int; // This isn't defined in < 1.0 so we copy the implementation there pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *const HMAC_CTX) -> c_int; // These functions are defined in OpenSSL as macros, so we shim them #[link_name = "BIO_eof_shim"] pub fn BIO_eof(b: *mut BIO) -> c_int; Loading openssl-sys/src/lib.rs +0 −1 Original line number Diff line number Diff line Loading @@ -454,7 +454,6 @@ extern "C" { pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *const HMAC_CTX) -> c_int; pub fn PEM_read_bio_DHparams(bio: *mut BIO, out: *mut *mut DH, callback: Option<PasswordCallback>, user_data: *mut c_void) -> *mut DH; Loading openssl/src/crypto/hmac.rs +1 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ impl Clone for HMAC { let mut ctx: ffi::HMAC_CTX; unsafe { ctx = ::std::mem::uninitialized(); let r = ffi::HMAC_CTX_copy(&mut ctx, &self.ctx); let r = ffi_extras::HMAC_CTX_copy(&mut ctx, &self.ctx); assert_eq!(r, 1); } HMAC { ctx: ctx, type_: self.type_, state: self.state } Loading Loading
openssl-sys-extras/src/lib.rs +3 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ extern { #[cfg_attr(not(target_os = "nacl"), link_name = "HMAC_Update_shim")] pub fn HMAC_Update(ctx: *mut HMAC_CTX, input: *const u8, len: c_uint) -> c_int; // This isn't defined in < 1.0 so we copy the implementation there pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *const HMAC_CTX) -> c_int; // These functions are defined in OpenSSL as macros, so we shim them #[link_name = "BIO_eof_shim"] pub fn BIO_eof(b: *mut BIO) -> c_int; Loading
openssl-sys/src/lib.rs +0 −1 Original line number Diff line number Diff line Loading @@ -454,7 +454,6 @@ extern "C" { pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *const HMAC_CTX) -> c_int; pub fn PEM_read_bio_DHparams(bio: *mut BIO, out: *mut *mut DH, callback: Option<PasswordCallback>, user_data: *mut c_void) -> *mut DH; Loading
openssl/src/crypto/hmac.rs +1 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ impl Clone for HMAC { let mut ctx: ffi::HMAC_CTX; unsafe { ctx = ::std::mem::uninitialized(); let r = ffi::HMAC_CTX_copy(&mut ctx, &self.ctx); let r = ffi_extras::HMAC_CTX_copy(&mut ctx, &self.ctx); assert_eq!(r, 1); } HMAC { ctx: ctx, type_: self.type_, state: self.state } Loading