diff options
author | Janis Danisevskis <jdanis@google.com> | 2021-10-11 13:47:46 -0700 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-10-15 23:16:08 +0000 |
commit | 0ad296aa02db8ecbafae8903dd9ca6a4ead51ba6 (patch) | |
tree | 4774b2f63ba8494913c704dcd80e21a1724d7160 /src/cbor_cert_op.c | |
parent | 5fa29e05de0cb7c89502c02aa97c1071eb37a38a (diff) | |
download | open-dice-0ad296aa02db8ecbafae8903dd9ca6a4ead51ba6.tar.gz |
Make DICE_ID_SIZE a constant.
This patch introduces DICE_ID_SIZE replacing literal 20 as id size.
Test: N/A
Change-Id: I2b1ccfb1f6925360378493f689baf41a364ef800
Reviewed-on: https://pigweed-review.googlesource.com/c/open-dice/+/65580
Reviewed-by: Andrew Scull <ascull@google.com>
Reviewed-by: Darren Krahn <dkrahn@google.com>
Pigweed-Auto-Submit: Janis Danisevskis <jdanis@google.com>
Commit-Queue: Janis Danisevskis <jdanis@google.com>
Diffstat (limited to 'src/cbor_cert_op.c')
-rw-r--r-- | src/cbor_cert_op.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cbor_cert_op.c b/src/cbor_cert_op.c index 3e9ebeb..915d443 100644 --- a/src/cbor_cert_op.c +++ b/src/cbor_cert_op.c @@ -325,7 +325,7 @@ DiceResult DiceGenerateCertificate( goto out; } - uint8_t subject_id[20]; + uint8_t subject_id[DICE_ID_SIZE]; result = DiceDeriveCdiCertificateId(context, subject_public_key, DICE_PUBLIC_KEY_SIZE, subject_id); if (result != kDiceResultOk) { @@ -343,7 +343,7 @@ DiceResult DiceGenerateCertificate( goto out; } - uint8_t authority_id[20]; + uint8_t authority_id[DICE_ID_SIZE]; result = DiceDeriveCdiCertificateId(context, authority_public_key, DICE_PUBLIC_KEY_SIZE, authority_id); if (result != kDiceResultOk) { |