diff options
author | Richard Levitte <levitte@openssl.org> | 2015-11-27 14:10:15 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-12-07 17:36:57 +0100 |
commit | fa0c23de83efaf92da17cffce12444adbca48c89 (patch) | |
tree | eabc5d551793512d436f4cecd34c24bd82c3505b /crypto/evp/p5_crpt2.c | |
parent | Have other crypto/evp files include evp_locl.h (diff) | |
download | openssl-fa0c23de83efaf92da17cffce12444adbca48c89.tar.xz openssl-fa0c23de83efaf92da17cffce12444adbca48c89.zip |
Adapt HMAC to the EVP_MD_CTX changes
This change required some special treatment, as HMAC is intertwined
with EVP_MD. For now, all local HMAC_CTX variables MUST be
initialised with HMAC_CTX_EMPTY, or whatever happens to be on the
stack will be mistaken for actual pointers to EVP_MD_CTX. This will
change as soon as HMAC_CTX becomes opaque.
Also, since HMAC_CTX_init() can fail now, its return type changes from
void to int, and it will return 0 on failure, 1 on success.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/evp/p5_crpt2.c')
-rw-r--r-- | crypto/evp/p5_crpt2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c index 4986a21361..dcc04631bd 100644 --- a/crypto/evp/p5_crpt2.c +++ b/crypto/evp/p5_crpt2.c @@ -85,7 +85,7 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, unsigned char digtmp[EVP_MAX_MD_SIZE], *p, itmp[4]; int cplen, j, k, tkeylen, mdlen; unsigned long i = 1; - HMAC_CTX hctx_tpl, hctx; + HMAC_CTX hctx_tpl = HMAC_CTX_EMPTY, hctx = HMAC_CTX_EMPTY; mdlen = EVP_MD_size(digest); if (mdlen < 0) |