From bf1cb55844ce60fbef5039eb95dd24e9def3016e Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 31 Aug 2024 10:42:21 +0000 Subject: [PATCH] Zap HMAC_Init Long deprecated, last users have been fixed. ok beck jsing --- lib/libcrypto/Symbols.list | 1 - lib/libcrypto/hidden/openssl/hmac.h | 3 +-- lib/libcrypto/hmac/hmac.c | 11 +---------- lib/libcrypto/hmac/hmac.h | 4 +--- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index a7ea05436c5..3eb64bb2d66 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -1433,7 +1433,6 @@ HMAC_CTX_new HMAC_CTX_reset HMAC_CTX_set_flags HMAC_Final -HMAC_Init HMAC_Init_ex HMAC_Update IPAddressChoice_free diff --git a/lib/libcrypto/hidden/openssl/hmac.h b/lib/libcrypto/hidden/openssl/hmac.h index ecf8aa99972..ef8d2187bb5 100644 --- a/lib/libcrypto/hidden/openssl/hmac.h +++ b/lib/libcrypto/hidden/openssl/hmac.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmac.h,v 1.2 2023/07/05 21:14:54 bcook Exp $ */ +/* $OpenBSD: hmac.h,v 1.3 2024/08/31 10:42:21 tb Exp $ */ /* * Copyright (c) 2016 Philip Guenther * @@ -28,7 +28,6 @@ LCRYPTO_USED(HMAC_CTX_new); LCRYPTO_USED(HMAC_CTX_free); LCRYPTO_UNUSED(HMAC_CTX_reset); -LCRYPTO_UNUSED(HMAC_Init); LCRYPTO_USED(HMAC_Init_ex); LCRYPTO_USED(HMAC_Update); LCRYPTO_USED(HMAC_Final); diff --git a/lib/libcrypto/hmac/hmac.c b/lib/libcrypto/hmac/hmac.c index 1315b1a0d2c..dc1614d3ce5 100644 --- a/lib/libcrypto/hmac/hmac.c +++ b/lib/libcrypto/hmac/hmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hmac.c,v 1.35 2024/06/01 07:36:16 tb Exp $ */ +/* $OpenBSD: hmac.c,v 1.36 2024/08/31 10:42:21 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -136,15 +136,6 @@ err: } LCRYPTO_ALIAS(HMAC_Init_ex); -int -HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md) -{ - if (key && md) - HMAC_CTX_init(ctx); - return HMAC_Init_ex(ctx, key, len, md, NULL); -} -LCRYPTO_ALIAS(HMAC_Init); - int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len) { diff --git a/lib/libcrypto/hmac/hmac.h b/lib/libcrypto/hmac/hmac.h index 0f39009c9da..6f29972aadc 100644 --- a/lib/libcrypto/hmac/hmac.h +++ b/lib/libcrypto/hmac/hmac.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmac.h,v 1.19 2024/07/09 07:57:57 tb Exp $ */ +/* $OpenBSD: hmac.h,v 1.20 2024/08/31 10:42:21 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -82,8 +82,6 @@ HMAC_CTX *HMAC_CTX_new(void); void HMAC_CTX_free(HMAC_CTX *ctx); int HMAC_CTX_reset(HMAC_CTX *ctx); -int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md) - __attribute__ ((__bounded__(__buffer__, 2, 3))); int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, ENGINE *impl) __attribute__ ((__bounded__(__buffer__, 2, 3))); -- 2.20.1