summaryrefslogtreecommitdiff
path: root/lib/secrets.h
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2021-05-11 11:08:59 +0200
committerDaiki Ueno <ueno@gnu.org>2021-05-11 14:05:57 +0200
commit47a4b238ad3e4e3244711e8d7e8e15a8392c4c78 (patch)
tree85d7f027c84bafa4f3885721e48f27f43d6b66ce /lib/secrets.h
parent60f32b84f41d8c4f56f08e5332f341d0ecf693ee (diff)
downloadgnutls-47a4b238ad3e4e3244711e8d7e8e15a8392c4c78.tar.gz
_tls13_{derive,expand}_secret2: fix array parameter mismatch
This suppresses the warning with -Warray-parameter secrets.c:85:40: warning: argument 6 of type 'const uint8_t[64]' {aka 'const unsigned char[64]'} with mismatched bound [-Warray-parameter=] 85 | const uint8_t secret[MAX_HASH_SIZE], | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from secrets.c:28: secrets.h:43:41: note: previously declared as 'const uint8_t[32]' {aka 'const unsigned char[32]'} 43 | const uint8_t secret[MAX_CIPHER_KEY_SIZE], | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'lib/secrets.h')
-rw-r--r--lib/secrets.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/secrets.h b/lib/secrets.h
index 13220264a3..181b53bed2 100644
--- a/lib/secrets.h
+++ b/lib/secrets.h
@@ -40,7 +40,7 @@ int _tls13_derive_secret(gnutls_session_t session,
int _tls13_derive_secret2(const mac_entry_st *prf,
const char *label, unsigned label_size,
const uint8_t *tbh, size_t tbh_size,
- const uint8_t secret[MAX_CIPHER_KEY_SIZE],
+ const uint8_t secret[MAX_HASH_SIZE],
void *out);
int _tls13_expand_secret(gnutls_session_t session,
@@ -52,7 +52,7 @@ int _tls13_expand_secret(gnutls_session_t session,
int _tls13_expand_secret2(const mac_entry_st *prf,
const char *label, unsigned label_size,
const uint8_t *msg, size_t msg_size,
- const uint8_t secret[MAX_CIPHER_KEY_SIZE],
+ const uint8_t secret[MAX_HASH_SIZE],
unsigned out_size, void *out);
#endif /* GNUTLS_LIB_SECRETS_H */