Relax test on forbidden signing [DO NOT MERGE]
Copy from widevine repo of http://go/wvgerrit/15390 Because some devices are failing oemcrypto unit tests related to signing schemes that they do not support, we are relaxing the requirement that they return the correct error code. We are still requiring that the device does NOT sign with a forbidden scheme. However, it is OK if they do not return an error code from OEMCrypto_GenerateRSASignature. They will be required to return the correct error code in the next release. bug: 21668896 bug: 21708882 Change-Id: I1b8a410909b364d0086cba38eadca11aceaac5f6
This commit is contained in:
@@ -3248,10 +3248,13 @@ class OEMCryptoLoadsCertificateAlternates : public OEMCryptoLoadsCertificate {
|
||||
licenseRequest.size(), &signature[0],
|
||||
&signature_length, scheme);
|
||||
}
|
||||
if (OEMCrypto_SUCCESS == sts) {
|
||||
cout << "WARNING: signature request returned success for\n"
|
||||
<< "forbidden padding scheme=" << (int)scheme
|
||||
<< ", size=" << (int)size << ".\n"
|
||||
<< "This will be an error in the next release!\n";
|
||||
|
||||
ASSERT_NE(OEMCrypto_SUCCESS, sts)
|
||||
<< "Signed with forbidden padding scheme=" << (int)scheme
|
||||
<< ", size=" << (int)size;
|
||||
}
|
||||
vector<uint8_t> zero(signature_length, 0);
|
||||
ASSERT_EQ(zero, signature); // signature should not be computed.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user