Match GenerateRSASignature unit test code with actual code
Merge of Widevine CDM change: https://widevine-internal-review.googlesource.com/#/c/10620/ bug: 15829029 Change-Id: I8ae472f1f72f9a260de3e9443b104bea27ab6eb3
This commit is contained in:
@@ -2879,14 +2879,15 @@ TEST_F(DISABLED_TestKeybox, RSASignature) {
|
||||
OEMCrypto_GetRandom(&licenseRequest[0], licenseRequest.size());
|
||||
size_t signature_length = 0;
|
||||
|
||||
uint8_t signature[500];
|
||||
|
||||
sts = OEMCrypto_GenerateRSASignature(s.session_id(), &licenseRequest[0],
|
||||
licenseRequest.size(), NULL,
|
||||
licenseRequest.size(), signature,
|
||||
&signature_length, kSign_RSASSA_PSS);
|
||||
|
||||
ASSERT_EQ(OEMCrypto_ERROR_SHORT_BUFFER, sts);
|
||||
ASSERT_NE(static_cast<size_t>(0), signature_length);
|
||||
|
||||
uint8_t* signature = new uint8_t[signature_length];
|
||||
ASSERT_GE(sizeof(signature), signature_length);
|
||||
|
||||
sts = OEMCrypto_GenerateRSASignature(s.session_id(), &licenseRequest[0],
|
||||
licenseRequest.size(), signature,
|
||||
@@ -2898,7 +2899,6 @@ TEST_F(DISABLED_TestKeybox, RSASignature) {
|
||||
s.PreparePublicKey();
|
||||
s.VerifyRSASignature(&licenseRequest[0], licenseRequest.size(), signature,
|
||||
signature_length, kSign_RSASSA_PSS);
|
||||
delete[] signature;
|
||||
}
|
||||
|
||||
TEST_F(DISABLED_TestKeybox, LoadRSASessionKey) {
|
||||
|
||||
Reference in New Issue
Block a user