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,7 +1,13 @@
// 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_CONTENT_KEY_SESSSION_H_
#define WVCDM_CORE_CONTENT_KEY_SESSSION_H_
#include "key_session.h"
#include "metrics_collections.h"
#include "override.h"
#include "timer_metric.h"
namespace wvcdm {
@@ -15,45 +21,49 @@ class ContentKeySession : public KeySession {
cipher_mode_(kCipherModeCtr) {}
virtual ~ContentKeySession() {}
KeySessionType Type() { return kDefault; }
virtual KeySessionType Type() OVERRIDE { return kDefault; }
// Generate Derived Keys for ContentKeySession
bool GenerateDerivedKeys(const std::string& message);
virtual bool GenerateDerivedKeys(const std::string& message) OVERRIDE;
// Generate Derived Keys (from session key) for ContentKeySession
bool GenerateDerivedKeys(const std::string& message,
const std::string& session_key);
virtual bool GenerateDerivedKeys(const std::string& message,
const std::string& session_key) OVERRIDE;
// 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);
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;
OEMCryptoResult LoadEntitledContentKeys(const std::vector<CryptoKey>&) {
virtual OEMCryptoResult LoadEntitledContentKeys(
const std::vector<CryptoKey>&) OVERRIDE {
return OEMCrypto_ERROR_INVALID_CONTEXT;
}
// Select Key for ContentKeySession
OEMCryptoResult SelectKey(const std::string& key_id,
CdmCipherMode cipher_mode);
virtual OEMCryptoResult SelectKey(const std::string& key_id,
CdmCipherMode cipher_mode) OVERRIDE;
// Decrypt for ContentKeySession
OEMCryptoResult Decrypt(const CdmDecryptionParameters& params,
OEMCrypto_DestBufferDesc& buffer_descriptor,
OEMCrypto_CENCEncryptPatternDesc& pattern_descriptor);
virtual OEMCryptoResult Decrypt(
const CdmDecryptionParameters& params,
OEMCrypto_DestBufferDesc& buffer_descriptor,
OEMCrypto_CENCEncryptPatternDesc& pattern_descriptor) OVERRIDE;
protected:
OEMCryptoResult LoadKeys(
virtual OEMCryptoResult LoadKeysAsLicenseType(
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, OEMCrypto_LicenseType license_type);
const std::string& srm_requirement,
OEMCrypto_LicenseType license_type);
CryptoSessionId oec_session_id_;
private: