From 6a6db513258224651c8e12c43545d368c7456bbc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 Mar 2016 16:56:24 +0000 Subject: git-svn-id: http://svn.miranda-ng.org/main/trunk@16502 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/openssl/hmac.h | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'include/openssl/hmac.h') diff --git a/include/openssl/hmac.h b/include/openssl/hmac.h index b8b55cda7d..71d7d65916 100644 --- a/include/openssl/hmac.h +++ b/include/openssl/hmac.h @@ -1,4 +1,3 @@ -/* crypto/hmac/hmac.h */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,10 +59,6 @@ # include -# ifdef OPENSSL_NO_HMAC -# error HMAC is disabled. -# endif - # include # define HMAC_MAX_MD_CBLOCK 128/* largest known is SHA512 */ @@ -72,33 +67,24 @@ extern "C" { #endif -typedef struct hmac_ctx_st { - const EVP_MD *md; - EVP_MD_CTX md_ctx; - EVP_MD_CTX i_ctx; - EVP_MD_CTX o_ctx; - unsigned int key_length; - unsigned char key[HMAC_MAX_MD_CBLOCK]; -} HMAC_CTX; - -# define HMAC_size(e) (EVP_MD_size((e)->md)) - -void HMAC_CTX_init(HMAC_CTX *ctx); -void HMAC_CTX_cleanup(HMAC_CTX *ctx); +size_t HMAC_size(HMAC_CTX *e); +HMAC_CTX *HMAC_CTX_new(void); +int HMAC_CTX_reset(HMAC_CTX *ctx); +void HMAC_CTX_free(HMAC_CTX *ctx); -/* deprecated */ -# define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) +DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, + const EVP_MD *md)) -/* deprecated */ -int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md); -int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, - const EVP_MD *md, ENGINE *impl); -int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); -int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); +/*__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, + size_t len); +/*__owur*/ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, + unsigned int *len); unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, const unsigned char *d, size_t n, unsigned char *md, unsigned int *md_len); -int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); +__owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); -- cgit v1.2.3