Create general certificate provisioning tests

Creates parameterized certificate provisioning tests to prepare for DRM
reprovisioning implementation.
- Create parameterized certificate provisioning test suite.
- Change RETURN_IF_NOT_OPEN macro to call IsOpen instead of checking
  the |open_| variable to make mocking of CryptoSession methods easier.

Bug: b/305093063
Merged from https://widevine-internal-review.googlesource.com/188051

Change-Id: Ic1c344af64073a8ff5626530a0864bfeea90fc6e
This commit is contained in:
Geoffrey Alexander
2023-11-21 00:48:35 +00:00
committed by Robert Shih
parent 442ee78db1
commit 62ba0133cf
3 changed files with 292 additions and 6 deletions

View File

@@ -62,7 +62,7 @@ OEMCryptoResult WrapIfNecessary(OEMCryptoResult ret_value) { return ret_value; }
}
#define RETURN_IF_NOT_OPEN(ret_value) \
if (!open_) { \
if (!IsOpen()) { \
LOGE("Crypto session is not open"); \
return WrapIfNecessary(ret_value); \
}