diff options
| author | Gleb Kozyrev <[email protected]> | 2015-01-10 13:45:33 +0200 |
|---|---|---|
| committer | Gleb Kozyrev <[email protected]> | 2015-01-28 21:51:12 +0200 |
| commit | eb7b7bf8478be66b4849f2d336dbffd6a8374284 (patch) | |
| tree | b4f4d29e4bf676992991f8874444e63816dc053d /openssl-sys/src/lib.rs | |
| parent | Release v0.2.18 (diff) | |
| download | rust-openssl-eb7b7bf8478be66b4849f2d336dbffd6a8374284.tar.xz rust-openssl-eb7b7bf8478be66b4849f2d336dbffd6a8374284.zip | |
Change Hasher and HMAC APIs closer to std::hash model
- Implement Clone and std::io::Writer.
- Reduce the API to write() and finish(). Contrary to std::hash, finish() resets the hasher immediately.
- Add hmac::hmac() convenience fn.
- Replace hash::evpmd() with HashType methods.
- Add assertions as a crude check for failed calls into openssl.
- Add examples and some tests.
[breaking-change]
Diffstat (limited to 'openssl-sys/src/lib.rs')
| -rw-r--r-- | openssl-sys/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 9f80fb1c..b2e2d312 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -370,6 +370,7 @@ extern "C" { pub fn EVP_DigestFinal_ex(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; + pub fn EVP_MD_CTX_copy_ex(dst: *mut EVP_MD_CTX, src: *const EVP_MD_CTX) -> c_int; pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); pub fn EVP_PKEY_new() -> *mut EVP_PKEY; @@ -383,6 +384,7 @@ extern "C" { pub fn HMAC_Final(ctx: *mut HMAC_CTX, output: *mut u8, len: *mut c_uint) -> c_int; pub fn HMAC_Update(ctx: *mut HMAC_CTX, input: *const u8, len: c_uint) -> c_int; 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_X509(bio: *mut BIO, out: *mut *mut X509, callback: Option<PasswordCallback>, |