Source release 15.0.0
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include "content_key_session.h"
|
||||
#include "crypto_key.h"
|
||||
#include "metrics_collections.h"
|
||||
#include "override.h"
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
@@ -20,32 +19,35 @@ class EntitlementKeySession : public ContentKeySession {
|
||||
public:
|
||||
EntitlementKeySession(CryptoSessionId oec_session_id,
|
||||
metrics::CryptoMetrics* metrics);
|
||||
virtual ~EntitlementKeySession() {}
|
||||
~EntitlementKeySession() override {}
|
||||
|
||||
KeySessionType Type() { return kEntitlement; }
|
||||
|
||||
// Load Keys for ContentKeySession
|
||||
virtual OEMCryptoResult LoadKeys(const std::string& message,
|
||||
const std::string& signature,
|
||||
const std::string& mac_key_iv,
|
||||
const std::string& mac_key,
|
||||
const std::vector<CryptoKey>& keys,
|
||||
const std::string& provider_session_token,
|
||||
CdmCipherMode* cipher_mode,
|
||||
const std::string& srm_requirement) OVERRIDE;
|
||||
virtual OEMCryptoResult LoadEntitledContentKeys(
|
||||
const std::vector<CryptoKey>& keys) OVERRIDE;
|
||||
virtual OEMCryptoResult SelectKey(const std::string& key_id,
|
||||
CdmCipherMode cipher_mode) OVERRIDE;
|
||||
OEMCryptoResult LoadKeys(const std::string& message,
|
||||
const std::string& signature,
|
||||
const std::string& mac_key_iv,
|
||||
const std::string& mac_key,
|
||||
const std::vector<CryptoKey>& keys,
|
||||
const std::string& provider_session_token,
|
||||
CdmCipherMode* cipher_mode,
|
||||
const std::string& srm_requirement) override;
|
||||
OEMCryptoResult LoadEntitledContentKeys(
|
||||
const std::vector<CryptoKey>& keys) override;
|
||||
OEMCryptoResult SelectKey(const std::string& key_id,
|
||||
CdmCipherMode cipher_mode) override;
|
||||
|
||||
private:
|
||||
// The object returned by this function contains raw pointers to the passed-in
|
||||
// CryptoKey object. Care should be taken that it does not outlive the
|
||||
// CryptoKey.
|
||||
// The message is populated with the fields of the provided CryptoKey and the
|
||||
// returned object reflects the offsets and lengths into that message for each
|
||||
// field.
|
||||
OEMCrypto_EntitledContentKeyObject MakeOecEntitledKey(
|
||||
const CryptoKey& input_key);
|
||||
const CryptoKey& input_key, std::string& message);
|
||||
|
||||
std::map<std::string, CryptoKey> entitled_keys_;
|
||||
// Find the CryptoKey for the given entitled content key id.
|
||||
std::map<KeyId, CryptoKey> entitled_keys_;
|
||||
// Find the current entitled content key id for the given entitlement key id.
|
||||
std::map<KeyId, KeyId> current_loaded_content_keys_;
|
||||
};
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
Reference in New Issue
Block a user