return 0;
}
+#ifndef OPENSSL_NO_DEPRECATED
int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md)
{
if (key && md)
HMAC_CTX_init(ctx);
return HMAC_Init_ex(ctx, key, len, md, NULL);
}
+#endif
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
{
if (md == NULL)
md = m;
HMAC_CTX_init(&c);
- if (!HMAC_Init(&c, key, key_len, evp_md))
+ if (!HMAC_Init_ex(&c, key, key_len, evp_md, NULL))
goto err;
if (!HMAC_Update(&c, d, n))
goto err;
void HMAC_CTX_init(HMAC_CTX *ctx);
void HMAC_CTX_cleanup(HMAC_CTX *ctx);
+#ifdef OPENSSL_USE_DEPRECATED
/* deprecated */
# define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx)
/* deprecated */
-__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
- const EVP_MD *md);
+DECLARE_DEPRECATED(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
+ const EVP_MD *md));
+
+#endif
/*__owur*/ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md, ENGINE *impl);
/*__owur*/ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,