Reject Embedded Keys Under 16 Bytes
(This is a merge of http://go/wvgerrit/60620) The license code handles keys larger than 16 bytes correctly, but it does not properly reject keys smaller than 16 bytes. This patch adds unit tests not only for the new error case but also the existing success cases which were not previously being tested. As part of this, license_unittest was changed to use a Test Peer instead of making the test fixture a friend class. Bug: 111069024 Test: CE CDM unit tests Test: Android unit tests Change-Id: Idb2deb6fbe0aeb19b530f9818bebff480541f5c8
This commit is contained in:
@@ -184,7 +184,9 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
|
||||
break;
|
||||
case KEY_REQUEST_ERROR_1: *os << "KEY_REQUEST_ERROR_1";
|
||||
break;
|
||||
case KEY_SIZE_ERROR: *os << "KEY_SIZE_ERROR";
|
||||
case KEY_SIZE_ERROR_1: *os << "KEY_SIZE_ERROR_1";
|
||||
break;
|
||||
case KEY_SIZE_ERROR_2: *os << "KEY_SIZE_ERROR_2";
|
||||
break;
|
||||
case KEYSET_ID_NOT_FOUND_1: *os << "KEYSET_ID_NOT_FOUND_1";
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user