Source release 14.1.0

This commit is contained in:
John W. Bruce
2018-06-29 15:59:47 -07:00
parent 3ab70cec4e
commit afa11a48a0
1941 changed files with 557780 additions and 105547 deletions

View File

@@ -1,8 +1,18 @@
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// License Agreement.
#ifndef WVCDM_CORE_ENTITLEMENT_KEY_SESSSION_H_
#define WVCDM_CORE_ENTITLEMENT_KEY_SESSSION_H_
#include <map>
#include <string>
#include "OEMCryptoCENC.h"
#include "content_key_session.h"
#include "key_session.h"
#include "crypto_key.h"
#include "metrics_collections.h"
#include "override.h"
namespace wvcdm {
@@ -15,20 +25,29 @@ class EntitlementKeySession : public ContentKeySession {
KeySessionType Type() { return kEntitlement; }
// Load Keys for ContentKeySession
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);
OEMCryptoResult LoadEntitledContentKeys(const std::vector<CryptoKey>& keys);
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;
private:
std::vector<CryptoKey> keys_;
// 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.
OEMCrypto_EntitledContentKeyObject MakeOecEntitledKey(
const CryptoKey& input_key);
std::map<std::string, CryptoKey> entitled_keys_;
};
} // namespace wvcdm
#endif // WVCDM_CORE_ENTITLEMENT_KEY_SESSSION_H_
#endif // WVCDM_CORE_ENTITLEMENT_KEY_SESSSION_H_