diff options
author | tb <> | 2021-12-12 21:35:47 +0000 |
---|---|---|
committer | tb <> | 2021-12-12 21:35:47 +0000 |
commit | 2079bd78020b8fe474a6b532e0144a4a39456ffb (patch) | |
tree | 44e57823eb232bea1ffbc4c1b1417f4ee3865a66 /src/lib/libcrypto/hmac | |
parent | c1ae4c3a2dcb48029aaea219cb195e9dfe1d093d (diff) | |
download | openbsd-2079bd78020b8fe474a6b532e0144a4a39456ffb.tar.gz openbsd-2079bd78020b8fe474a6b532e0144a4a39456ffb.tar.bz2 openbsd-2079bd78020b8fe474a6b532e0144a4a39456ffb.zip |
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
Diffstat (limited to 'src/lib/libcrypto/hmac')
-rw-r--r-- | src/lib/libcrypto/hmac/hmac.h | 9 |
1 files changed, 5 insertions, 4 deletions
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 @@ | |||
1 | /* $OpenBSD: hmac.h,v 1.13 2018/02/17 14:53:59 jsing Exp $ */ | 1 | /* $OpenBSD: hmac.h,v 1.14 2021/12/12 21:35:47 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -72,16 +72,17 @@ | |||
72 | extern "C" { | 72 | extern "C" { |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | typedef struct hmac_ctx_st { | 75 | /* Move to hmac_local.h */ |
76 | struct hmac_ctx_st { | ||
76 | const EVP_MD *md; | 77 | const EVP_MD *md; |
77 | EVP_MD_CTX md_ctx; | 78 | EVP_MD_CTX md_ctx; |
78 | EVP_MD_CTX i_ctx; | 79 | EVP_MD_CTX i_ctx; |
79 | EVP_MD_CTX o_ctx; | 80 | EVP_MD_CTX o_ctx; |
80 | unsigned int key_length; | 81 | unsigned int key_length; |
81 | unsigned char key[HMAC_MAX_MD_CBLOCK]; | 82 | unsigned char key[HMAC_MAX_MD_CBLOCK]; |
82 | } HMAC_CTX; | 83 | } /* HMAC_CTX */; |
83 | 84 | ||
84 | #define HMAC_size(e) (EVP_MD_size((e)->md)) | 85 | #define HMAC_size(e) (EVP_MD_size(HMAC_CTX_get_md((e)))) |
85 | 86 | ||
86 | HMAC_CTX *HMAC_CTX_new(void); | 87 | HMAC_CTX *HMAC_CTX_new(void); |
87 | void HMAC_CTX_free(HMAC_CTX *ctx); | 88 | void HMAC_CTX_free(HMAC_CTX *ctx); |