Update unit tests for v15.2

Merge from Widevine repo of http://go/wvgerrit/77609

For v15.2 we require that nonces not collide across sessions and there are
restrictions placed on the mac key's IV in LoadKeys.

Test: ran unit tests on reference code

Bug: 131325434
Bug: 131326334

Change-Id: I1bb01c30d8c15d66d762c28b57d7700c44daa835
This commit is contained in:
Fred Gylys-Colwell
2019-04-29 14:40:57 -07:00
parent 3e5ade22f9
commit 96431e9c2d
9 changed files with 74 additions and 13 deletions

View File

@@ -173,6 +173,10 @@ class SessionContext {
void AddNonce(uint32_t nonce);
bool CheckNonce(uint32_t nonce);
// Verify that the nonce does not match any in this session's nonce table.
bool NonceCollision(uint32_t nonce) const {
return nonce_table_.NonceCollision(nonce);
}
void FlushNonces();
virtual OEMCryptoResult CreateNewUsageEntry(uint32_t* usage_entry_number);