From 901ed35709ac79e841b89d947a0d84526f4d8daf Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Thu, 6 Feb 2020 16:28:21 +0200 Subject: Make n_subcredentials a size_t . Based on David's review. --- src/core/crypto/hs_ntor.c | 4 ++-- src/core/crypto/hs_ntor.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/crypto') diff --git a/src/core/crypto/hs_ntor.c b/src/core/crypto/hs_ntor.c index 4bd11ef98e..07bcdc566c 100644 --- a/src/core/crypto/hs_ntor.c +++ b/src/core/crypto/hs_ntor.c @@ -471,7 +471,7 @@ hs_ntor_service_get_introduce1_keys_multi( const struct ed25519_public_key_t *intro_auth_pubkey, const struct curve25519_keypair_t *intro_enc_keypair, const struct curve25519_public_key_t *client_ephemeral_enc_pubkey, - int n_subcredentials, + size_t n_subcredentials, const hs_subcredential_t *subcredentials, hs_ntor_intro_cell_keys_t *hs_ntor_intro_cell_keys_out) { @@ -499,7 +499,7 @@ hs_ntor_service_get_introduce1_keys_multi( secret_input); bad |= safe_mem_is_zero(secret_input, CURVE25519_OUTPUT_LEN); - for (int i = 0; i < n_subcredentials; ++i) { + for (unsigned i = 0; i < n_subcredentials; ++i) { /* Get ENC_KEY and MAC_KEY! */ get_introduce1_key_material(secret_input, &subcredentials[i], &hs_ntor_intro_cell_keys_out[i]); diff --git a/src/core/crypto/hs_ntor.h b/src/core/crypto/hs_ntor.h index 2ed357f02d..9a975dd83f 100644 --- a/src/core/crypto/hs_ntor.h +++ b/src/core/crypto/hs_ntor.h @@ -62,7 +62,7 @@ int hs_ntor_service_get_introduce1_keys_multi( const struct ed25519_public_key_t *intro_auth_pubkey, const struct curve25519_keypair_t *intro_enc_keypair, const struct curve25519_public_key_t *client_ephemeral_enc_pubkey, - int n_subcredentials, + size_t n_subcredentials, const hs_subcredential_t *subcredentials, hs_ntor_intro_cell_keys_t *hs_ntor_intro_cell_keys_out); -- cgit v1.2.3-54-g00ecf