From 631d3e7a4c509c9a231959f07f58f311dc038579 Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Tue, 11 Aug 2015 15:17:38 -0700 Subject: [PATCH] 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 --- libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp index d909b157..86c784a5 100644 --- a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp +++ b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp @@ -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 zero(signature_length, 0); ASSERT_EQ(zero, signature); // signature should not be computed. }