diff options
author | tb <> | 2024-08-31 10:42:21 +0000 |
---|---|---|
committer | tb <> | 2024-08-31 10:42:21 +0000 |
commit | 50e7b8e3a51beeb992068b20edea932e63a73b3c (patch) | |
tree | 90f3cf1cb1bf531bd7dfe87fad014ab5e62033b5 /src/lib/libcrypto/hmac | |
parent | 5f2f30a42713c09c044e2c44e73efbb410607666 (diff) | |
download | openbsd-50e7b8e3a51beeb992068b20edea932e63a73b3c.tar.gz openbsd-50e7b8e3a51beeb992068b20edea932e63a73b3c.tar.bz2 openbsd-50e7b8e3a51beeb992068b20edea932e63a73b3c.zip |
Zap HMAC_Init
Long deprecated, last users have been fixed.
ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/hmac')
-rw-r--r-- | src/lib/libcrypto/hmac/hmac.c | 11 | ||||
-rw-r--r-- | src/lib/libcrypto/hmac/hmac.h | 4 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/lib/libcrypto/hmac/hmac.c b/src/lib/libcrypto/hmac/hmac.c index 1315b1a0d2..dc1614d3ce 100644 --- a/src/lib/libcrypto/hmac/hmac.c +++ b/src/lib/libcrypto/hmac/hmac.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hmac.c,v 1.35 2024/06/01 07:36:16 tb Exp $ */ | 1 | /* $OpenBSD: hmac.c,v 1.36 2024/08/31 10:42:21 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 | * |
@@ -137,15 +137,6 @@ err: | |||
137 | LCRYPTO_ALIAS(HMAC_Init_ex); | 137 | LCRYPTO_ALIAS(HMAC_Init_ex); |
138 | 138 | ||
139 | int | 139 | int |
140 | HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md) | ||
141 | { | ||
142 | if (key && md) | ||
143 | HMAC_CTX_init(ctx); | ||
144 | return HMAC_Init_ex(ctx, key, len, md, NULL); | ||
145 | } | ||
146 | LCRYPTO_ALIAS(HMAC_Init); | ||
147 | |||
148 | int | ||
149 | HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len) | 140 | HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len) |
150 | { | 141 | { |
151 | if (ctx->md == NULL) | 142 | if (ctx->md == NULL) |
diff --git a/src/lib/libcrypto/hmac/hmac.h b/src/lib/libcrypto/hmac/hmac.h index 0f39009c9d..6f29972aad 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.19 2024/07/09 07:57:57 tb Exp $ */ | 1 | /* $OpenBSD: hmac.h,v 1.20 2024/08/31 10:42:21 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 | * |
@@ -82,8 +82,6 @@ HMAC_CTX *HMAC_CTX_new(void); | |||
82 | void HMAC_CTX_free(HMAC_CTX *ctx); | 82 | void HMAC_CTX_free(HMAC_CTX *ctx); |
83 | int HMAC_CTX_reset(HMAC_CTX *ctx); | 83 | int HMAC_CTX_reset(HMAC_CTX *ctx); |
84 | 84 | ||
85 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md) | ||
86 | __attribute__ ((__bounded__(__buffer__, 2, 3))); | ||
87 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, | 85 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, |
88 | ENGINE *impl) | 86 | ENGINE *impl) |
89 | __attribute__ ((__bounded__(__buffer__, 2, 3))); | 87 | __attribute__ ((__bounded__(__buffer__, 2, 3))); |