Source release 19.1.0

This commit is contained in:
Matt Feddersen
2024-03-28 19:21:54 -07:00
parent 28ec8548c6
commit b8bdfccebe
182 changed files with 10645 additions and 2040 deletions

View File

@@ -275,18 +275,14 @@ bool FakeProvisioningServer::MakeResponse(
// Next, we derive the keys from the keybox device key. This is Provisioning
// 2.0 specific.
// TODO(b/141438127): Add support for provisioing 3.0.
std::string mac_context;
GenerateMacContext(serialized_message, &mac_context);
std::vector<uint8_t> mac_context_v(mac_context.begin(), mac_context.end());
std::string enc_context;
GenerateEncryptContext(serialized_message, &enc_context);
std::vector<uint8_t> enc_context_v(enc_context.begin(), enc_context.end());
wvoec::KeyDeriver key_deriver;
std::vector<uint8_t> serialized_message_v(serialized_message.begin(),
serialized_message.end());
// Not only is this Prov 2.0 specific, it assumes the device is using the
// standard test keybox.
key_deriver.DeriveKeys(wvoec::kTestKeybox.device_key_,
sizeof(wvoec::kTestKeybox.device_key_), mac_context_v,
enc_context_v);
sizeof(wvoec::kTestKeybox.device_key_),
serialized_message_v);
// Create a structure to hold the RSA private key. This is used by the key
// deriver to encrypt the key.