diff options
author | George Kadianakis <desnacked@riseup.net> | 2020-02-06 16:28:21 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2020-02-11 02:13:40 +0200 |
commit | 901ed35709ac79e841b89d947a0d84526f4d8daf (patch) | |
tree | c17bb4c18f18367abe5a998a7db35a7b9f318ece /src/feature/hs/hs_cell.c | |
parent | ba99287d13782048f58a88dc5d18780fad9f2034 (diff) | |
download | tor-901ed35709ac79e841b89d947a0d84526f4d8daf.tar.gz tor-901ed35709ac79e841b89d947a0d84526f4d8daf.zip |
Make n_subcredentials a size_t .
Based on David's review.
Diffstat (limited to 'src/feature/hs/hs_cell.c')
-rw-r--r-- | src/feature/hs/hs_cell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/hs/hs_cell.c b/src/feature/hs/hs_cell.c index 97a1691f16..dd5fefd7e7 100644 --- a/src/feature/hs/hs_cell.c +++ b/src/feature/hs/hs_cell.c @@ -77,7 +77,7 @@ compute_introduce_mac(const uint8_t *encoded_cell, size_t encoded_cell_len, static hs_ntor_intro_cell_keys_t * get_introduce2_key_material(const ed25519_public_key_t *auth_key, const curve25519_keypair_t *enc_key, - int n_subcredentials, + size_t n_subcredentials, const hs_subcredential_t *subcredentials, const uint8_t *encrypted_section, curve25519_public_key_t *client_pk) @@ -787,7 +787,7 @@ get_introduce2_keys_and_verify_mac(hs_cell_introduce2_data_t *data, /* Validate MAC from the cell and our computed key material. The MAC field * in the cell is at the end of the encrypted section. */ intro_keys_result = tor_malloc_zero(sizeof(*intro_keys_result)); - for (int i = 0; i < data->n_subcredentials; ++i) { + for (unsigned i = 0; i < data->n_subcredentials; ++i) { uint8_t mac[DIGEST256_LEN]; /* The MAC field is at the very end of the ENCRYPTED section. */ |