aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/crypto/hmac.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-08-15 18:46:15 -0700
committerSteven Fackler <[email protected]>2016-08-15 18:46:15 -0700
commit0f428d190410263e4daa65b917c0e84707a9c0ef (patch)
tree4d6d5b8b77c7ca5755a3636786b8a36584fba92a /openssl/src/crypto/hmac.rs
parentMerge branch 'release-v0.7.15-sys-v0.8.0' into release (diff)
parentRelease openssl-sys v0.7.16, openssl v0.8.1 (diff)
downloadrust-openssl-openssl-sys-v0.7.16.tar.xz
rust-openssl-openssl-sys-v0.7.16.zip
Merge branch 'release-sys-v0.7.16-v0.8.1' into releaseopenssl-v0.8.1openssl-sys-v0.7.16
Diffstat (limited to 'openssl/src/crypto/hmac.rs')
-rw-r--r--openssl/src/crypto/hmac.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/openssl/src/crypto/hmac.rs b/openssl/src/crypto/hmac.rs
index 857be339..1847d6b1 100644
--- a/openssl/src/crypto/hmac.rs
+++ b/openssl/src/crypto/hmac.rs
@@ -92,11 +92,11 @@ impl HMAC {
fn init_once(&mut self, md: *const ffi::EVP_MD, key: &[u8]) -> Result<(), ErrorStack> {
unsafe {
- try_ssl!(c_helpers::rust_HMAC_Init_ex(&mut self.ctx,
- key.as_ptr() as *const _,
- key.len() as c_int,
- md,
- 0 as *mut _));
+ try_ssl!(c_helpers::rust_0_8_HMAC_Init_ex(&mut self.ctx,
+ key.as_ptr() as *const _,
+ key.len() as c_int,
+ md,
+ 0 as *mut _));
}
self.state = Reset;
Ok(())
@@ -113,11 +113,11 @@ impl HMAC {
// If the key and/or md is not supplied it's reused from the last time
// avoiding redundant initializations
unsafe {
- try_ssl!(c_helpers::rust_HMAC_Init_ex(&mut self.ctx,
- 0 as *const _,
- 0,
- 0 as *const _,
- 0 as *mut _));
+ try_ssl!(c_helpers::rust_0_8_HMAC_Init_ex(&mut self.ctx,
+ 0 as *const _,
+ 0,
+ 0 as *const _,
+ 0 as *mut _));
}
self.state = Reset;
Ok(())
@@ -130,7 +130,7 @@ impl HMAC {
while !data.is_empty() {
let len = cmp::min(data.len(), c_uint::max_value() as usize);
unsafe {
- try_ssl!(c_helpers::rust_HMAC_Update(&mut self.ctx, data.as_ptr(), len as c_uint));
+ try_ssl!(c_helpers::rust_0_8_HMAC_Update(&mut self.ctx, data.as_ptr(), len as c_uint));
}
data = &data[len..];
}
@@ -147,7 +147,7 @@ impl HMAC {
unsafe {
let mut len = ffi::EVP_MAX_MD_SIZE;
let mut res = vec![0; len as usize];
- try_ssl!(c_helpers::rust_HMAC_Final(&mut self.ctx, res.as_mut_ptr(), &mut len));
+ try_ssl!(c_helpers::rust_0_8_HMAC_Final(&mut self.ctx, res.as_mut_ptr(), &mut len));
res.truncate(len as usize);
self.state = Finalized;
Ok(res)