Merge "Small fixes leftover from V16 merge."

This commit is contained in:
Alex Dale
2020-02-07 21:25:17 +00:00
committed by Android (Google) Code Review
8 changed files with 11 additions and 12 deletions

View File

@@ -76,8 +76,8 @@ class CertificateProvisioning {
std::unique_ptr<ServiceCertificate> service_certificate_;
// Indicates whether OEMCrypto supports core messages, and whether the
// CDM should expect a core message in the response. This is primarly
// used to distinguish between v16+ OEMCrypto or and earlier version.
// CDM should expect a core message in the response. This is primarily
// used to distinguish between v16+ OEMCrypto or an earlier version.
// Assume core messages are supported, and check if OEMCrypto populates
// the core message field when calling PrepAndSignProvisioningRequest().
bool supports_core_messages_ = true;

View File

@@ -1475,7 +1475,6 @@ CdmResponseType CdmEngine::ReleaseUsageInfo(
}
CdmResponseType status = usage_session_->ReleaseKey(message);
// Q: Should this only be reset if release key was successful?
usage_session_.reset();
if (NO_ERROR != status) {
LOGE("ReleaseKey failed: status = %d", status);

View File

@@ -558,7 +558,7 @@ CdmResponseType CdmLicense::HandleKeyResponse(
// Check that the server returned a |core_message|. If missing, then
// the server is assumed to operate as V15. This will imply that the
// |signature| field in the respones does not include a core message
// |signature| field in the response does not include a core message
// either.
if (!signed_response.has_oemcrypto_core_message()) {
supports_core_messages_ = false;

View File

@@ -1,4 +1,4 @@
// Copyright 2013 Google Inc. All Rights Reserved.
// Copyright 2019 Google Inc. All Rights Reserved.
//
// Clock - A fake clock just for running tests.

View File

@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// Copyright 2019 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// License Agreement.
//

View File

@@ -1,6 +1,6 @@
The ODK Library is used to generate and parse core OEMCrypto messages.
This library is used by both OEMcrypto on a device, and by Widvine license and
This library is used by both OEMCrypto on a device, and by Widvine license and
provisioning servers.
The source of truth for these files is in the server code base on piper. Do not

View File

@@ -56,7 +56,7 @@ class UsageTableEntry {
virtual OEMCryptoResult ReportUsage(const std::vector<uint8_t>& pst,
uint8_t* buffer, size_t* buffer_length);
virtual void UpdateAndIncrement(ODK_ClockValues* clock_values);
// Save all data to the give buffer. This should be called after updating the
// Save all data to the given buffer. This should be called after updating the
// data.
OEMCryptoResult SaveData(CryptoEngine* ce, SessionContext* session,
uint8_t* signed_buffer, size_t buffer_size);
@@ -72,8 +72,8 @@ class UsageTableEntry {
recent_decrypt_ = recent_decrypt;
}
static size_t SignedEntrySize();
const uint8_t* mac_key_server() { return data_.mac_key_server; }
const uint8_t* mac_key_client() { return data_.mac_key_client; }
const uint8_t* mac_key_server() const { return data_.mac_key_server; }
const uint8_t* mac_key_client() const { return data_.mac_key_client; }
protected:
UsageTable* usage_table_; // Owner of this object.

View File

@@ -214,7 +214,7 @@ TEST_F(OEMCryptoClientTest, VersionNumber) {
}
// The resource rating is a number from 1 to 4. The first three levels were
// initiallly defined in API 15 and they were expaneded in API 16.
// initially defined in API 15 and they were expanded in API 16.
TEST_F(OEMCryptoClientTest, ResourceRatingAPI15) {
ASSERT_GE(OEMCrypto_ResourceRatingTier(), 1u);
ASSERT_LE(OEMCrypto_ResourceRatingTier(), 4u);
@@ -298,7 +298,7 @@ TEST_F(OEMCryptoClientTest, CheckMaxNumberOfSessionsAPI10) {
TEST_F(OEMCryptoClientTest, CheckUsageTableSizeAPI16) {
const size_t maximum = OEMCrypto_MaximumUsageTableHeaderSize();
printf(" Max Usage Table Size: %zu.\n", maximum);
// A maximum of 0 means the table is constrained my dynamic memory allocation.
// A maximum of 0 means the table is constrained by dynamic memory allocation.
if (maximum > 0) ASSERT_GE(maximum, RequiredUsageSize());
}