From b6f096d08ac11e5628610ece68d7d1c3ee1c5b67 Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Wed, 17 Jun 2015 15:53:12 -0700 Subject: [PATCH] Fix QueryKeyControl Unit Test Merge from widevine repo of http://go/wvgerrit/14720 The QueryKeyControl test expects an error message that the output buffer is too small. However, it also gives a bad key id. Some devices were correctly returning key not found. This corrects the key id length so that the only error is that the buffer is too small. bug: 21881768 Change-Id: I96f59ede42eeddc9849fbac1e52acecdb562df08 --- libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp index 42d1a369..bd2ae915 100644 --- a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp +++ b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp @@ -2285,7 +2285,7 @@ TEST_F(OEMCryptoSessionTests, QueryKeyControl) { size_t size = sizeof(block) - 1; OEMCryptoResult sts = OEMCrypto_QueryKeyControl( s.session_id(), s.license().keys[0].key_id, - sizeof(s.license().keys[0].key_id), reinterpret_cast(&block), + s.license().keys[0].key_id_length, reinterpret_cast(&block), &size); if (sts == OEMCrypto_ERROR_NOT_IMPLEMENTED) { return;