diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/hmac/hmac.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/lib/libcrypto/hmac/hmac.h b/src/lib/libcrypto/hmac/hmac.h index abdd19450e..0f39009c9d 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.18 2024/06/01 07:36:16 tb Exp $ */ | 1 | /* $OpenBSD: hmac.h,v 1.19 2024/07/09 07:57:57 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 | * |
@@ -60,6 +60,10 @@ | |||
60 | 60 | ||
61 | #include <openssl/opensslconf.h> | 61 | #include <openssl/opensslconf.h> |
62 | 62 | ||
63 | #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) | ||
64 | #define __bounded__(x, y, z) | ||
65 | #endif | ||
66 | |||
63 | #ifdef OPENSSL_NO_HMAC | 67 | #ifdef OPENSSL_NO_HMAC |
64 | #error HMAC is disabled. | 68 | #error HMAC is disabled. |
65 | #endif | 69 | #endif |
@@ -78,14 +82,18 @@ HMAC_CTX *HMAC_CTX_new(void); | |||
78 | void HMAC_CTX_free(HMAC_CTX *ctx); | 82 | void HMAC_CTX_free(HMAC_CTX *ctx); |
79 | int HMAC_CTX_reset(HMAC_CTX *ctx); | 83 | int HMAC_CTX_reset(HMAC_CTX *ctx); |
80 | 84 | ||
81 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, | 85 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md) |
82 | const EVP_MD *md); /* deprecated */ | 86 | __attribute__ ((__bounded__(__buffer__, 2, 3))); |
83 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, | 87 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, |
84 | ENGINE *impl); | 88 | ENGINE *impl) |
85 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); | 89 | __attribute__ ((__bounded__(__buffer__, 2, 3))); |
90 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len) | ||
91 | __attribute__ ((__bounded__(__buffer__, 2, 3))); | ||
86 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); | 92 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); |
87 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, | 93 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, |
88 | const unsigned char *d, size_t n, unsigned char *md, unsigned int *md_len) | 94 | const unsigned char *d, size_t n, unsigned char *md, unsigned int *md_len) |
95 | __attribute__ ((__bounded__(__buffer__, 2, 3))) | ||
96 | __attribute__ ((__bounded__(__buffer__, 4, 5))) | ||
89 | __attribute__((__nonnull__ (6))); | 97 | __attribute__((__nonnull__ (6))); |
90 | int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); | 98 | int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); |
91 | 99 | ||