Source release 18.1.0

This commit is contained in:
John "Juce" Bruce
2023-06-23 15:45:08 -07:00
parent 2baa7c6e2b
commit b2c35151ad
2074 changed files with 196004 additions and 427059 deletions

View File

@@ -1,3 +1,6 @@
#ifndef CDM_OEMCRYPTO_SESSION_TESTS_HELPER_
#define CDM_OEMCRYPTO_SESSION_TESTS_HELPER_
#include <assert.h>
#include <openssl/aes.h>
#include <openssl/rand.h>
@@ -17,8 +20,10 @@ class SessionUtil {
kTestRSAPKCS8PrivateKeyInfo2_2048 +
sizeof(kTestRSAPKCS8PrivateKeyInfo2_2048)) {}
// Create a new wrapped DRM Certificate.
void CreateWrappedRSAKey();
// Create a new wrapped DRM Certificate. This creates a new one, even if one
// already exists. For provisioning 2 or 3, it uses encoded_rsa_key_ to
// specify the key. For Prov 4.0, the key is generated by OEMCrypto.
void CreateWrappedDRMKey();
// This is used to force installation of a keybox. This overwrites the
// production keybox -- it does NOT use OEMCrypto_LoadTestKeybox.
@@ -26,15 +31,33 @@ class SessionUtil {
// This loads the test keybox or the test RSA key, using LoadTestKeybox or
// LoadTestRSAKey as needed.
void EnsureTestKeys();
void EnsureTestROT();
void InstallTestRSAKey(Session* s);
// Install a DRM private key in to the session. If a key has not been created,
// tehn CreateWrappedDRMKey is used to create one first. Works with Prov 2-4.
void InstallTestDrmKey(Session* s);
// Create and install an OEM Cert private key. After creation, the key is
// saved to oem_public_key_. Only for provisioning 4.0
void CreateProv4OEMKey(Session* s);
// Create a new DRM Cert. Only for provisioning 4.0
void CreateProv4DRMKey();
void CreateProv4CastKey(Session *s, bool load_drm_before_prov_req);
// Used by prov2.0, prov3.0, and prov 4.0
std::vector<uint8_t> encoded_rsa_key_;
std::vector<uint8_t> wrapped_rsa_key_;
OEMCrypto_PrivateKeyType key_type_;
std::vector<uint8_t> wrapped_drm_key_;
OEMCrypto_PrivateKeyType drm_key_type_;
std::vector<uint8_t> drm_public_key_;
wvoec::WidevineKeybox keybox_;
// Used by prov4.0
std::vector<uint8_t> wrapped_oem_key_;
std::vector<uint8_t> oem_public_key_;
OEMCrypto_PrivateKeyType oem_key_type_;
};
} // namespace wvoec
#endif // CDM_OEMCRYPTO_SESSION_TESTS_HELPER_