Merge "Small fixes leftover from V16 merge."
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user