summaryrefslogtreecommitdiffstats
path: root/test/hmactest.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2015-11-27 14:10:15 +0100
committerRichard Levitte <levitte@openssl.org>2015-12-07 17:36:57 +0100
commitfa0c23de83efaf92da17cffce12444adbca48c89 (patch)
treeeabc5d551793512d436f4cecd34c24bd82c3505b /test/hmactest.c
parent77a01145be26ceeefa6870e1e9dd7f99ac123fa3 (diff)
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 'test/hmactest.c')
-rw-r--r--test/hmactest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/hmactest.c b/test/hmactest.c
index f8d535063f..20c7a8fc00 100644
--- a/test/hmactest.c
+++ b/test/hmactest.c
@@ -134,7 +134,7 @@ int main(int argc, char *argv[])
char *p;
# endif
int err = 0;
- HMAC_CTX ctx, ctx2;
+ HMAC_CTX ctx = HMAC_CTX_EMPTY, ctx2 = HMAC_CTX_EMPTY;
unsigned char buf[EVP_MAX_MD_SIZE];
unsigned int len;