Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rust Openssl
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public Repositories
Rust Openssl
Commits
ae9e2b1e
Commit
ae9e2b1e
authored
10 years ago
by
Steven Fackler
Browse files
Options
Downloads
Plain Diff
Merge pull request #117 from Ummon/master
Add the openssl function prototype 'HMAC_CTX_cleanup'.
parents
7f965824
6d2f8d67
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
openssl-sys/src/lib.rs
+1
-0
1 addition, 0 deletions
openssl-sys/src/lib.rs
src/crypto/hmac.rs
+8
-0
8 additions, 0 deletions
src/crypto/hmac.rs
with
9 additions
and
0 deletions
openssl-sys/src/lib.rs
+
1
−
0
View file @
ae9e2b1e
...
...
@@ -361,6 +361,7 @@ extern "C" {
pub
fn
HMAC_Init_ex
(
ctx
:
*
mut
HMAC_CTX
,
key
:
*
const
u8
,
keylen
:
c_int
,
md
:
*
const
EVP_MD
,
imple
:
*
const
ENGINE
);
pub
fn
HMAC_Final
(
ctx
:
*
mut
HMAC_CTX
,
output
:
*
mut
u8
,
len
:
*
mut
c_uint
);
pub
fn
HMAC_Update
(
ctx
:
*
mut
HMAC_CTX
,
input
:
*
const
u8
,
len
:
c_uint
);
pub
fn
HMAC_CTX_cleanup
(
ctx
:
*
mut
HMAC_CTX
);
pub
fn
PEM_read_bio_X509
(
bio
:
*
mut
BIO
,
out
:
*
mut
*
mut
X509
,
callback
:
Option
<
PasswordCallback
>
,
...
...
This diff is collapsed.
Click to expand it.
src/crypto/hmac.rs
+
8
−
0
View file @
ae9e2b1e
...
...
@@ -61,6 +61,14 @@ impl HMAC {
}
}
impl
Drop
for
HMAC
{
fn
drop
(
&
mut
self
)
{
unsafe
{
ffi
::
HMAC_CTX_cleanup
(
&
mut
self
.ctx
);
}
}
}
#[cfg(test)]
mod
tests
{
use
serialize
::
hex
::
FromHex
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment