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:
Fred Gylys-Colwell
2015-08-11 15:17:38 -07:00
parent 496bfc87b3
commit 631d3e7a4c

View File

@@ -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.
}