Cleanup: fix all sources that used HMAC_CTX_init
[openssl.git] / crypto / hmac / hmac.c
index 2fe511938583a92d3b81e1507a8e9556dd889642..3bc93a8841cfc7a7348866b806720e37d04ee7ee 100644 (file)
@@ -131,7 +131,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
 int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md)
 {
     if (key && md)
-        HMAC_CTX_init(ctx);
+        HMAC_CTX_reset(ctx);
     return HMAC_Init_ex(ctx, key, len, md, NULL);
 }
 #endif
@@ -173,7 +173,7 @@ HMAC_CTX *HMAC_CTX_new(void)
 {
     HMAC_CTX *ctx = (HMAC_CTX *)OPENSSL_zalloc(sizeof(HMAC_CTX));
     if (ctx)
-        if (!HMAC_CTX_init(ctx)) {
+        if (!HMAC_CTX_reset(ctx)) {
             HMAC_CTX_free(ctx);
             ctx = NULL;
         }
@@ -201,7 +201,7 @@ void HMAC_CTX_free(HMAC_CTX *ctx)
     }
 }
 
-int HMAC_CTX_init(HMAC_CTX *ctx)
+int HMAC_CTX_reset(HMAC_CTX *ctx)
 {
     hmac_ctx_cleanup(ctx);
     if (ctx->i_ctx == NULL)
@@ -225,7 +225,7 @@ int HMAC_CTX_init(HMAC_CTX *ctx)
 
 int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx)
 {
-    if (!HMAC_CTX_init(dctx))
+    if (!HMAC_CTX_reset(dctx))
         goto err;
     if (!EVP_MD_CTX_copy_ex(dctx->i_ctx, sctx->i_ctx))
         goto err;