summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-01-14 08:06:03 +0000
committertb <>2022-01-14 08:06:03 +0000
commit0ed71e7fb768c8004e3f4c0bbf0e0d05f959fc28 (patch)
treeef2ff298c221b77dba3f0d7259097749121d84b3
parent2937a039a92eb7f2f17179de8df55799204e6141 (diff)
downloadopenbsd-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.h6
-rw-r--r--src/lib/libcrypto/hmac/hmac_local.h5
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
77HMAC_CTX *HMAC_CTX_new(void); 77HMAC_CTX *HMAC_CTX_new(void);
78void HMAC_CTX_free(HMAC_CTX *ctx); 78void HMAC_CTX_free(HMAC_CTX *ctx);
79void HMAC_CTX_init(HMAC_CTX *ctx);
80int HMAC_CTX_reset(HMAC_CTX *ctx); 79int HMAC_CTX_reset(HMAC_CTX *ctx);
81void HMAC_CTX_cleanup(HMAC_CTX *ctx);
82
83#define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */
84 80
85int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 81int 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
78void HMAC_CTX_init(HMAC_CTX *ctx);
79void 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 */