Source release 17.1.2

This commit is contained in:
John "Juce" Bruce
2023-06-23 15:37:42 -07:00
parent a10f13a2dc
commit 2baa7c6e2b
353 changed files with 12903 additions and 2305 deletions

View File

@@ -391,6 +391,13 @@ class CdmEngine {
virtual void SetDefaultOtaKeyboxFallbackDurationRules();
virtual void SetFastOtaKeyboxFallbackDurationRules();
// A signing method specifically used by Cast.
// This method should not be used otherwise.
virtual CdmResponseType SignRsa(const std::string& wrapped_key,
const std::string& message,
std::string* signature,
RSA_Padding_Scheme padding_scheme);
protected:
friend class CdmEngineFactory;
@@ -438,6 +445,8 @@ class CdmEngine {
CdmSessionMap session_map_;
CdmReleaseKeySetMap release_key_sets_;
std::unique_ptr<CertificateProvisioning> cert_provisioning_;
// Lock must be acquired before using |cert_provisioning_|.
std::mutex cert_provisioning_mutex_;
wvutil::FileSystem* file_system_;
wvutil::Clock clock_;
std::string spoid_;

View File

@@ -220,6 +220,13 @@ class CdmSession {
virtual metrics::SessionMetrics* GetMetrics() { return metrics_.get(); }
virtual CdmResponseType LoadCastPrivateKey(
const CryptoWrappedKey& private_key);
virtual CdmResponseType GenerateRsaSignature(const std::string& message,
std::string* signature,
RSA_Padding_Scheme scheme);
private:
friend class CdmSessionTest;

View File

@@ -363,6 +363,11 @@ class CryptoSession {
virtual CdmResponseType LoadOtaProvisioning(bool use_test_key,
const std::string& response);
// Cast specific generate signature method.
virtual CdmResponseType GenerateRsaSignature(const std::string& message,
std::string* signature,
RSA_Padding_Scheme scheme);
protected:
// Creates an instance of CryptoSession with the given |crypto_metrics|.
// |crypto_metrics| is owned by the caller, must NOT be null, and must
@@ -401,8 +406,6 @@ class CryptoSession {
// Note: This function will lock the global static field lock in write mode.
bool SetUpUsageTableHeader(RequestedSecurityLevel requested_security_level);
CdmResponseType GenerateRsaSignature(const std::string& message,
std::string* signature);
size_t GetMaxSubsampleRegionSize();
bool SetDestinationBufferType();

View File

@@ -196,7 +196,7 @@ class DeviceFiles {
std::string* provider_session_token);
virtual bool DeleteUsageInfo(const std::string& usage_info_file_name,
const std::string& provider_session_token);
const CdmKeySetId& key_set_id);
// Deletes a set of provider sessions from the specified usage info.
// Sessions removed are based on the provided |key_set_ids|. If
@@ -259,7 +259,6 @@ class DeviceFiles {
virtual bool StoreUsageInfo(const std::string& usage_info_file_name,
const std::vector<CdmUsageData>& usage_data);
virtual bool UpdateUsageInfo(const std::string& usage_info_file_name,
const std::string& provider_session_token,
const CdmUsageData& usage_data);
virtual bool StoreHlsAttributes(const std::string& key_set_id,

View File

@@ -142,6 +142,7 @@ class Properties {
static void InitOnce();
static std::mutex init_mutex_;
static std::mutex session_mutex_;
static bool is_initialized_;
static bool oem_crypto_use_secure_buffers_;
static bool oem_crypto_use_fifo_;

View File

@@ -442,6 +442,17 @@ enum CdmResponseType : int32_t {
PROVISIONING_4_FAILED_TO_STORE_OEM_CERTIFICATE = 384,
PROVISIONING_4_FAILED_TO_STORE_DRM_CERTIFICATE = 385,
PROVISIONING_4_FAILED_TO_INITIALIZE_DEVICE_FILES_3 = 386,
GET_SIGNATURE_HASH_ALGORITHM_ERROR_1 = 387,
GET_SIGNATURE_HASH_ALGORITHM_ERROR_2 = 388,
GET_SIGNATURE_HASH_ALGORITHM_ERROR_3 = 389,
UNSUPPORTED_SIGNATURE_HASH_ALGORITHM_1 = 390,
UNSUPPORTED_SIGNATURE_HASH_ALGORITHM_2 = 391,
UNSUPPORTED_SIGNATURE_HASH_ALGORITHM_3 = 392,
UNSUPPORTED_SIGNATURE_HASH_ALGORITHM_4 = 393,
STORE_ATSC_LICENSE_DEVICE_FILES_INIT_ERROR = 394,
STORE_ATSC_LICENSE_ERROR = 395,
SESSION_NOT_FOUND_GENERIC_CRYPTO = 396,
SESSION_NOT_FOUND_24 = 397,
// Don't forget to add new values to
// * core/test/test_printers.cpp.
// * android/include/mapErrors-inl.h