diff options
author | tb <> | 2022-01-14 08:06:03 +0000 |
---|---|---|
committer | tb <> | 2022-01-14 08:06:03 +0000 |
commit | 0ed71e7fb768c8004e3f4c0bbf0e0d05f959fc28 (patch) | |
tree | ef2ff298c221b77dba3f0d7259097749121d84b3 | |
parent | 2937a039a92eb7f2f17179de8df55799204e6141 (diff) | |
download | openbsd-0ed71e7fb768c8004e3f4c0bbf0e0d05f959fc28.tar.gz openbsd-0ed71e7fb768c8004e3f4c0bbf0e0d05f959fc28.tar.bz2 openbsd-0ed71e7fb768c8004e3f4c0bbf0e0d05f959fc28.zip |
Remove HMAC_CTX_{init,cleanup}() and HMAC_init from public visibility
In OpenSSL commit 32fd54a9a3 HMAC_CTX_cleanup() was integrated into
HMAC_CTX_init(), then HMAC_CTX_init() was renamed to HMAC_CTX_reset()
in dc0099e1.
LibreSSL retained them for API compatibility with OpenSSL 1.0.
Not many things use them anymore. In fact, some projects that didn't
want to modify their code for OpenSSL 1.1 API compatibility used the
removed functions to wrap the OpenSSL 1.1 API. We had to patch some
of these and this will now no longer be necessary.
Also remove HMAC_cleanup(). Nothing uses this.
ok inoguchi jsing
-rw-r--r-- | src/lib/libcrypto/hmac/hmac.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/hmac/hmac_local.h | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/hmac/hmac.h b/src/lib/libcrypto/hmac/hmac.h index 0fe894e7b1..ff01ae26b0 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.15 2022/01/14 08:04:14 tb Exp $ */ | 1 | /* $OpenBSD: hmac.h,v 1.16 2022/01/14 08:06:03 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 | * |
@@ -76,11 +76,7 @@ extern "C" { | |||
76 | 76 | ||
77 | HMAC_CTX *HMAC_CTX_new(void); | 77 | HMAC_CTX *HMAC_CTX_new(void); |
78 | void HMAC_CTX_free(HMAC_CTX *ctx); | 78 | void HMAC_CTX_free(HMAC_CTX *ctx); |
79 | void HMAC_CTX_init(HMAC_CTX *ctx); | ||
80 | int HMAC_CTX_reset(HMAC_CTX *ctx); | 79 | int HMAC_CTX_reset(HMAC_CTX *ctx); |
81 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); | ||
82 | |||
83 | #define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */ | ||
84 | 80 | ||
85 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, | 81 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, |
86 | const EVP_MD *md); /* deprecated */ | 82 | const EVP_MD *md); /* deprecated */ |
diff --git a/src/lib/libcrypto/hmac/hmac_local.h b/src/lib/libcrypto/hmac/hmac_local.h index 8358d9fa8b..5900bc1c2d 100644 --- a/src/lib/libcrypto/hmac/hmac_local.h +++ b/src/lib/libcrypto/hmac/hmac_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hmac_local.h,v 1.2 2022/01/14 08:04:14 tb Exp $ */ | 1 | /* $OpenBSD: hmac_local.h,v 1.3 2022/01/14 08:06:03 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 | * |
@@ -75,6 +75,9 @@ struct hmac_ctx_st { | |||
75 | unsigned char key[HMAC_MAX_MD_CBLOCK]; | 75 | unsigned char key[HMAC_MAX_MD_CBLOCK]; |
76 | } /* HMAC_CTX */; | 76 | } /* HMAC_CTX */; |
77 | 77 | ||
78 | void HMAC_CTX_init(HMAC_CTX *ctx); | ||
79 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); | ||
80 | |||
78 | __END_HIDDEN_DECLS | 81 | __END_HIDDEN_DECLS |
79 | 82 | ||
80 | #endif /* !HEADER_HMAC_LOCAL_H */ | 83 | #endif /* !HEADER_HMAC_LOCAL_H */ |