Commit 5fe6f459 authored by Leonid Baraz's avatar Leonid Baraz Committed by Chromium LUCI CQ

Correct SignedEncryptionInfo.public_key_id.

The declaration in proto would now match code and TIN.

Bug: b:170054326
Change-Id: I1204ec91bf592ba31d592abb4461f9b83c81ae7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615102
Commit-Queue: Leonid Baraz <lbaraz@chromium.org>
Auto-Submit: Leonid Baraz <lbaraz@chromium.org>
Reviewed-by: default avatarZach Trudo <zatrudo@google.com>
Cr-Commit-Position: refs/heads/master@{#841308}
parent 2137432f
......@@ -152,8 +152,8 @@ void Decryptor::RecordKeyPair(
" actual=", base::NumberToString(public_key.size())}));
} else {
// Assign a random number to be public key id for testing purposes
// only (in production it will be Java Fingerprint2011 which is
// 'long').
// only (in production it will be retrieved from the server as
// 'int32').
Encryptor::PublicKeyId public_key_id;
base::RandBytes(&public_key_id, sizeof(public_key_id));
if (!decryptor->keys_.emplace(public_key_id, key_info).second) {
......
......@@ -116,7 +116,8 @@ message SignedEncryptionInfo {
// Public key id (required).
// Identifies private key matching |public_asymmetric_key| for the server.
optional uint64 public_key_id = 2;
// Matches Encryptor::PublicKeyId.
optional int32 public_key_id = 2;
// Signature of |public_asymmetric_key| (required).
// Verified by client against a well-known signature.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment