Fix TestLoadLicenseForOutOfRangeSubStringOffSetAndLengths()

In TestLoadLicenseForOutOfRangeSubStringOffSetAndLengths(),
LoadResponse() should be called after EncryptAndSignResponse() so this
is moved in this CL.

Bug: 231368221
Test: OEMCryptoMemoryLoadLicense tests
Change-Id: I7a0224afb21c3ab1d896ce3cfb64e1ad544a581a
This commit is contained in:
Vicky Min
2022-05-03 23:36:05 +00:00
parent da1e3c5de2
commit 1563fb2a27

View File

@@ -1702,9 +1702,9 @@ class OEMCryptoLicenseOverflowTest : public OEMCryptoSessionTests,
license_messages.SignAndVerifyRequest();
license_messages.CreateDefaultResponse();
size_t message_length = sizeof(license_messages.response_data());
OEMCryptoResult result = license_messages.LoadResponse();
f(message_length, &license_messages);
license_messages.EncryptAndSignResponse();
OEMCryptoResult result = license_messages.LoadResponse();
s.close();
// Verifying error is not due to signature failure which can be caused due
// to test code.