From fa0c23de83efaf92da17cffce12444adbca48c89 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 27 Nov 2015 14:10:15 +0100 Subject: 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 --- apps/speed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/speed.c b/apps/speed.c index 68530b1634..c90729c805 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -1298,7 +1298,7 @@ int speed_main(int argc, char **argv) #if !defined(OPENSSL_NO_MD5) if (doit[D_HMAC]) { - HMAC_CTX hctx; + HMAC_CTX hctx = HMAC_CTX_EMPTY; HMAC_CTX_init(&hctx); HMAC_Init_ex(&hctx, (unsigned char *)"This is a key...", -- cgit v1.2.3