From c2c9cf22aa6a46cfa24e29a06a5d0385ca428117 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 12 Dec 2021 21:35:47 +0000 Subject: Annotate the structs that will be moved to hmac_local.h and evp_locl.h in an upcoming bump. This omits EVP_AEAD_CTX which will be dealt with separately. EVP_CIPHER_INFO internals are still publicly visible in OpenSSL, so it won't be moved. Move typedefs for HMAC_CTX and EVP_ENCODE_CTX to ossl_typ.h. These typedefs will be visible by files including only hmac.h or evp.h since hmac.h includes evp.h and evp.h includes ossl_typ.h. ok inoguchi --- src/lib/libcrypto/hmac/hmac.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/hmac') diff --git a/src/lib/libcrypto/hmac/hmac.h b/src/lib/libcrypto/hmac/hmac.h index e787c62ac8..2f91f55f9b 100644 --- a/src/lib/libcrypto/hmac/hmac.h +++ b/src/lib/libcrypto/hmac/hmac.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmac.h,v 1.13 2018/02/17 14:53:59 jsing Exp $ */ +/* $OpenBSD: hmac.h,v 1.14 2021/12/12 21:35:47 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -72,16 +72,17 @@ extern "C" { #endif -typedef struct hmac_ctx_st { +/* Move to hmac_local.h */ +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; +} /* HMAC_CTX */; -#define HMAC_size(e) (EVP_MD_size((e)->md)) +#define HMAC_size(e) (EVP_MD_size(HMAC_CTX_get_md((e)))) HMAC_CTX *HMAC_CTX_new(void); void HMAC_CTX_free(HMAC_CTX *ctx); -- cgit v1.2.3-55-g6feb