summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Krahn <dkrahn@google.com>2022-10-20 18:09:13 -0700
committerDarren Krahn <dkrahn@google.com>2022-10-20 18:40:37 -0700
commit7f1b871c2664cf6acc6fe3aba71b1a0b11354ae2 (patch)
treed123723cbc5e95d2f8064dabf5266237de402785
parent42be1654012196cef065d1e6d49375e71b1d0818 (diff)
downloadattestation-7f1b871c2664cf6acc6fe3aba71b1a0b11354ae2.tar.gz
[atap] Fix array sizes
Some arrays were declared with the wrong constant causing them to be one byte larger than necessary. This was caught by using the array-parameter build warning. Bug: None Test: None Change-Id: Ia19cce2b0b5b97343b40dd7b84ab84a14c05756f
-rw-r--r--atap/ops/atap_ops_delegate.h2
-rw-r--r--atap/ops/openssl_ops.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/atap/ops/atap_ops_delegate.h b/atap/ops/atap_ops_delegate.h
index 2be7f85..96546f0 100644
--- a/atap/ops/atap_ops_delegate.h
+++ b/atap/ops/atap_ops_delegate.h
@@ -69,7 +69,7 @@ class AtapOpsDelegate {
AtapCurveType curve,
const uint8_t other_public_key[ATAP_ECDH_KEY_LEN],
uint8_t public_key[ATAP_ECDH_KEY_LEN],
- uint8_t shared_secret[ATAP_ECDH_KEY_LEN]) = 0;
+ uint8_t shared_secret[ATAP_ECDH_SHARED_SECRET_LEN]) = 0;
virtual AtapResult aes_gcm_128_encrypt(
const uint8_t* plaintext,
diff --git a/atap/ops/openssl_ops.h b/atap/ops/openssl_ops.h
index 782a6cd..98d095b 100644
--- a/atap/ops/openssl_ops.h
+++ b/atap/ops/openssl_ops.h
@@ -43,7 +43,7 @@ class OpensslOps : public AtapOpsDelegate {
AtapCurveType curve,
const uint8_t other_public_key[ATAP_ECDH_KEY_LEN],
uint8_t public_key[ATAP_ECDH_KEY_LEN],
- uint8_t shared_secret[ATAP_ECDH_KEY_LEN]) override;
+ uint8_t shared_secret[ATAP_ECDH_SHARED_SECRET_LEN]) override;
AtapResult aes_gcm_128_encrypt(const uint8_t* plaintext,
uint32_t len,