Clang Format some OEMCrypto Files
Merge from Widevine repo of http://go/wvgerrit/23240 This CL runs clang format on some OEMCrypto test and mock files, so it is easier to see what really changed in the next CL. Change-Id: I0abf98fc8d312d5b94ad51c3ef2caae820b931de
This commit is contained in:
@@ -222,18 +222,17 @@ void Session::LoadTestKeys(const std::string& pst, bool new_mac_keys) {
|
||||
&signature_[0], signature_.size(),
|
||||
encrypted_license().mac_key_iv,
|
||||
encrypted_license().mac_keys, num_keys_,
|
||||
key_array_, pst_ptr, pst.length(),
|
||||
NULL));
|
||||
key_array_, pst_ptr, pst.length(), NULL));
|
||||
// Update new generated keys.
|
||||
memcpy(&mac_key_server_[0], license_.mac_keys, wvcdm::MAC_KEY_SIZE);
|
||||
memcpy(&mac_key_client_[0], license_.mac_keys + wvcdm::MAC_KEY_SIZE,
|
||||
wvcdm::MAC_KEY_SIZE);
|
||||
} else {
|
||||
ASSERT_EQ(OEMCrypto_SUCCESS,
|
||||
OEMCrypto_LoadKeys(session_id(), message_ptr(), message_size_,
|
||||
&signature_[0], signature_.size(), NULL, NULL,
|
||||
num_keys_, key_array_, pst_ptr, pst.length(),
|
||||
NULL));
|
||||
ASSERT_EQ(
|
||||
OEMCrypto_SUCCESS,
|
||||
OEMCrypto_LoadKeys(session_id(), message_ptr(), message_size_,
|
||||
&signature_[0], signature_.size(), NULL, NULL,
|
||||
num_keys_, key_array_, pst_ptr, pst.length(), NULL));
|
||||
}
|
||||
VerifyTestKeys();
|
||||
}
|
||||
@@ -848,8 +847,8 @@ void Session::GenerateReport(const std::string& pst, bool expect_success,
|
||||
vector<uint8_t> computed_signature(SHA_DIGEST_LENGTH);
|
||||
unsigned int sig_len = SHA_DIGEST_LENGTH;
|
||||
HMAC(EVP_sha1(), &mac_key_client_[0], mac_key_client_.size(),
|
||||
&pst_report_buffer_[SHA_DIGEST_LENGTH],
|
||||
length - SHA_DIGEST_LENGTH, &computed_signature[0], &sig_len);
|
||||
&pst_report_buffer_[SHA_DIGEST_LENGTH], length - SHA_DIGEST_LENGTH,
|
||||
&computed_signature[0], &sig_len);
|
||||
EXPECT_EQ(0, memcmp(&computed_signature[0], pst_report().signature(),
|
||||
SHA_DIGEST_LENGTH));
|
||||
EXPECT_GE(kInactiveUnused, pst_report().status());
|
||||
|
||||
Reference in New Issue
Block a user