Adjust nonce flood rate in mock oemcrypto
Merge from Widevine repo of http://go/wvgerrit/43721 This CL allows the tester to change the nonce flood rate from the default of 20. A tester would want this value to be larger to make tests run more quickly. Setting the rate to 1 makes every other nonce request a flood error. A tester wants to do this in order to verify cdm code responds to nonce flood correctly. Several failing oemcrypto tests have also been corrected. This CL changes test code only. bug: 73607610 test: unit tests Change-Id: I3f52ff7ea9bcc1db7bc0e010da0b64a12d3b4dd3
This commit is contained in:
@@ -146,6 +146,9 @@ class CryptoEngine {
|
||||
|
||||
virtual bool srm_blacklisted_device_attached() { return false; }
|
||||
|
||||
// Rate limit for nonce generation. Default to 20 nonce/second.
|
||||
virtual int nonce_flood_count() { return 20; }
|
||||
|
||||
// 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