aboutsummaryrefslogtreecommitdiff
path: root/src/core/crypto
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2020-02-06 16:28:21 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2020-02-11 02:13:40 +0200
commit901ed35709ac79e841b89d947a0d84526f4d8daf (patch)
treec17bb4c18f18367abe5a998a7db35a7b9f318ece /src/core/crypto
parentba99287d13782048f58a88dc5d18780fad9f2034 (diff)
downloadtor-901ed35709ac79e841b89d947a0d84526f4d8daf.tar.gz
tor-901ed35709ac79e841b89d947a0d84526f4d8daf.zip
Make n_subcredentials a size_t .
Based on David's review.
Diffstat (limited to 'src/core/crypto')
-rw-r--r--src/core/crypto/hs_ntor.c4
-rw-r--r--src/core/crypto/hs_ntor.h2
2 files changed, 3 insertions, 3 deletions
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);