Cherry pick 18.4 changes to udc-widevine-dev
Get the udc-widevine-dev Android branch and oemcrypto-v18 cdm branch in sync. The commit ID for 18.4 on oemcrypto-v18 is a2f23a2281e5e06dc2867585bdc516fa132b6396. Merged from go/wvgerrit/190151 Bug: 290252845 Test: WVTS tests are running and passing Change-Id: I457332e7ca70a5b5169345e1279b3eb9f18413b6
This commit is contained in:
@@ -606,6 +606,12 @@ TEST_P(OEMCryptoSessionTestsDecryptTests,
|
||||
|
||||
TEST_F(OEMCryptoLoadsCertificate,
|
||||
OEMCryptoMemoryLoadProvisioningForHugeSignatureLength) {
|
||||
// TODO(b/197141970): Need to revisit OEMCryptoLoadsCert* tests for
|
||||
// provisioning 4. Disabled here temporarily.
|
||||
if (!global_features.loads_certificate ||
|
||||
global_features.provisioning_method == OEMCrypto_BootCertificateChain) {
|
||||
GTEST_SKIP() << "Test for non Prov 4.0 devices only.";
|
||||
}
|
||||
auto oemcrypto_function = [&](size_t signature_size) {
|
||||
Session s;
|
||||
ProvisioningRoundTrip provisioning_messages(&s, encoded_rsa_key_);
|
||||
@@ -638,6 +644,12 @@ TEST_F(OEMCryptoLoadsCertificate,
|
||||
|
||||
TEST_F(OEMCryptoLoadsCertificate,
|
||||
OEMCryptoMemoryLoadProvisioningForHugeWrappedRsaKeyLength) {
|
||||
// TODO(b/197141970): Need to revisit OEMCryptoLoadsCert* tests for
|
||||
// provisioning 4. Disabled here temporarily.
|
||||
if (!global_features.loads_certificate ||
|
||||
global_features.provisioning_method == OEMCrypto_BootCertificateChain) {
|
||||
GTEST_SKIP() << "Test for non Prov 4.0 devices only.";
|
||||
}
|
||||
auto oemcrypto_function = [&](size_t buffer_length) {
|
||||
Session s;
|
||||
ProvisioningRoundTrip provisioning_messages(&s, encoded_rsa_key_);
|
||||
@@ -663,6 +675,12 @@ TEST_F(OEMCryptoLoadsCertificate,
|
||||
|
||||
TEST_F(OEMCryptoLoadsCertificate,
|
||||
OEMCryptoMemoryLoadDrmPrivateKeyForHugeWrappedRsaKeyLength) {
|
||||
// TODO(b/197141970): Need to revisit OEMCryptoLoadsCert* tests for
|
||||
// provisioning 4. Disabled here temporarily.
|
||||
if (!global_features.loads_certificate ||
|
||||
global_features.provisioning_method == OEMCrypto_BootCertificateChain) {
|
||||
GTEST_SKIP() << "Test for non Prov 4.0 devices only.";
|
||||
}
|
||||
ASSERT_NO_FATAL_FAILURE(CreateWrappedDRMKey());
|
||||
auto oemcrypto_function = [&](size_t wrapped_rsa_key_length) {
|
||||
Session s;
|
||||
@@ -685,6 +703,12 @@ TEST_F(OEMCryptoLoadsCertificate,
|
||||
TEST_F(
|
||||
OEMCryptoLoadsCertificate,
|
||||
OEMCryptoMemoryLoadDrmPrivateKeyForHugeWrappedRsaKeyLengthStartingFromLength1) {
|
||||
// TODO(b/197141970): Need to revisit OEMCryptoLoadsCert* tests for
|
||||
// provisioning 4. Disabled here temporarily.
|
||||
if (!global_features.loads_certificate ||
|
||||
global_features.provisioning_method == OEMCrypto_BootCertificateChain) {
|
||||
GTEST_SKIP() << "Test for non Prov 4.0 devices only.";
|
||||
}
|
||||
ASSERT_NO_FATAL_FAILURE(CreateWrappedDRMKey());
|
||||
auto oemcrypto_function = [&](size_t wrapped_rsa_key_length) {
|
||||
Session s;
|
||||
@@ -765,8 +789,14 @@ TEST_F(OEMCryptoUsesCertificate,
|
||||
|
||||
TEST_F(OEMCryptoLoadsCertificateAlternates,
|
||||
OEMCryptoMemoryGenerateRSASignatureForHugeBuffer) {
|
||||
// TODO(b/197141970): Need to revisit OEMCryptoLoadsCert* tests for
|
||||
// provisioning 4. Disabled here temporarily.
|
||||
if (!global_features.loads_certificate ||
|
||||
global_features.provisioning_method == OEMCrypto_BootCertificateChain) {
|
||||
GTEST_SKIP() << "Test for non Prov 4.0 devices only.";
|
||||
}
|
||||
OEMCryptoResult sts;
|
||||
LoadWithAllowedSchemes(kSign_PKCS1_Block1, false);
|
||||
LoadCastCertificateKey(false);
|
||||
// If the device is a cast receiver, then this scheme is required.
|
||||
if (global_features.cast_receiver) {
|
||||
ASSERT_TRUE(key_loaded_);
|
||||
@@ -782,6 +812,7 @@ TEST_F(OEMCryptoLoadsCertificateAlternates,
|
||||
sts = OEMCrypto_GenerateRSASignature(s.session_id(), message_buffer.data(),
|
||||
message_buffer.size(), nullptr,
|
||||
&signature_length, kSign_PKCS1_Block1);
|
||||
if (sts == OEMCrypto_ERROR_NOT_IMPLEMENTED) return;
|
||||
ASSERT_EQ(OEMCrypto_ERROR_SHORT_BUFFER, sts);
|
||||
ASSERT_NE(static_cast<size_t>(0), signature_length);
|
||||
vector<uint8_t> signature(signature_length);
|
||||
@@ -799,7 +830,13 @@ TEST_F(OEMCryptoLoadsCertificateAlternates,
|
||||
|
||||
TEST_F(OEMCryptoLoadsCertificateAlternates,
|
||||
OEMCryptoMemoryGenerateRSASignatureForHugeSignatureLength) {
|
||||
LoadWithAllowedSchemes(kSign_PKCS1_Block1, false);
|
||||
// TODO(b/197141970): Need to revisit OEMCryptoLoadsCert* tests for
|
||||
// provisioning 4. Disabled here temporarily.
|
||||
if (!global_features.loads_certificate ||
|
||||
global_features.provisioning_method == OEMCrypto_BootCertificateChain) {
|
||||
GTEST_SKIP() << "Test for non Prov 4.0 devices only.";
|
||||
}
|
||||
LoadCastCertificateKey(false);
|
||||
// If the device is a cast receiver, then this scheme is required.
|
||||
if (global_features.cast_receiver) {
|
||||
ASSERT_TRUE(key_loaded_);
|
||||
|
||||
Reference in New Issue
Block a user