diff options
author | Pauli <paul.dale@oracle.com> | 2020-01-14 12:11:50 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-01-29 19:49:23 +1000 |
commit | dbde4726889a19af0a718fe9c5542f39c81acbd3 (patch) | |
tree | 371afa179289e0ba48e5a5c99520b139fd0f325f /include | |
parent | fd4d283e7527cb711a4ff42d5ddcbc40828077f5 (diff) |
Deprecate the low level HMAC functions
Use of the low level HMAC functions has been informally discouraged for a
long time. We now formally deprecate them.
Applications should instead use EVP_MAC_CTX_new(3), EVP_MAC_CTX_free(3),
EVP_MAC_init(3), EVP_MAC_update(3) and EVP_MAC_final(3).
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10836)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/hmac.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/include/openssl/hmac.h b/include/openssl/hmac.h index e06c204cfb..d05cdde168 100644 --- a/include/openssl/hmac.h +++ b/include/openssl/hmac.h @@ -28,27 +28,28 @@ extern "C" { # endif -size_t HMAC_size(const HMAC_CTX *e); -HMAC_CTX *HMAC_CTX_new(void); -int HMAC_CTX_reset(HMAC_CTX *ctx); -void HMAC_CTX_free(HMAC_CTX *ctx); +DEPRECATEDIN_3_0(size_t HMAC_size(const HMAC_CTX *e)) +DEPRECATEDIN_3_0(HMAC_CTX *HMAC_CTX_new(void)) +DEPRECATEDIN_3_0(int HMAC_CTX_reset(HMAC_CTX *ctx)) +DEPRECATEDIN_3_0(void HMAC_CTX_free(HMAC_CTX *ctx)) DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, - const EVP_MD *md)) - -/*__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); -__owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); - -void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); -const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); + const EVP_MD *md)) + +DEPRECATEDIN_3_0(int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, + const EVP_MD *md, ENGINE *impl)) +DEPRECATEDIN_3_0(int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, + size_t len)) +DEPRECATEDIN_3_0(int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, + unsigned int *len)) +DEPRECATEDIN_3_0(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)) +DEPRECATEDIN_3_0(__owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx)) + +DEPRECATEDIN_3_0(void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags)) +DEPRECATEDIN_3_0(const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx)) # ifdef __cplusplus } |