Restrict usage table size in mod mock
Merge from Widevine repo of http://go/wvgerrit/58820 This adds an option to the oemcrypto mod mock so that it will limit the usage table to the specified size. It returns the resource limit error code when the maximum size is reached. bug: 111260263 test: unit tests Change-Id: I166b06855fba77ae8ddd13a922fe05be93f2c8f6
This commit is contained in:
@@ -152,6 +152,10 @@ class CryptoEngine {
|
||||
// Rate limit for nonce generation. Default to 20 nonce/second.
|
||||
virtual int nonce_flood_count() { return 20; }
|
||||
|
||||
// Limit for size of usage table. If this is zero, then the
|
||||
// size is unlimited -- or limited only by memory size.
|
||||
virtual size_t max_usage_table_size() { return 0; }
|
||||
|
||||
// Set destination pointer based on the output destination description.
|
||||
OEMCryptoResult SetDestination(OEMCrypto_DestBufferDesc* out_description,
|
||||
size_t data_length, uint8_t subsample_flags);
|
||||
|
||||
Reference in New Issue
Block a user