------------- Moves ecm_generator to media_cas_packager_sdk/internal. ------------- Add a simple TCP server listening on a port. My intention is to use this server to support the Simulcrypt APIs (TODO). Also add a simple TCP client binary for testing the server and also demo how to call the Simulcrypt APIs (TODO). ------------- If only a single key is in the ECM, it is the EVEN key. To make the code matches this understanding, change a parameter from 'false' to 'true'. But this change has NO impact on the produced ECM, regardless this parameter is 'false' or 'true' (i.e., whether using push_front or push_back), only a single key is in the ECM. ------------- Add classes that process Simulcrypt ECMG messages 1) Stream_set-up 2) CW_provision ------------- Renames server and client binaries. ------------- Make ecmg call ecm_generator to generate ecm. The return of the ecm to Simulcrypt caller will be implemented in the next CL. For now, using the 'key' (control word) in CW_provision message also as the 'key_id'. ------------- Move common folder ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=217358698
58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// Copyright 2017 Google LLC.
|
|
//
|
|
// This software is licensed under the terms defined in the Widevine Master
|
|
// License Agreement. For a copy of this agreement, please contact
|
|
// widevine-licensing@google.com.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Description:
|
|
// Singleton object which validates VMP (Verified Media Pipeline) data for
|
|
// purposes of platform software verification.
|
|
|
|
#ifndef COMMON_VMP_CHECKER_H_
|
|
#define COMMON_VMP_CHECKER_H_
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "util/status.h"
|
|
#include "common/certificate_type.h"
|
|
|
|
namespace widevine {
|
|
class X509CA;
|
|
|
|
class VmpChecker {
|
|
public:
|
|
enum Result {
|
|
kUnverified = 0,
|
|
kVerified = 1,
|
|
kSecureStorageVerified = 2,
|
|
kTampered = 3
|
|
};
|
|
|
|
// Singleton accessor.
|
|
static VmpChecker* Instance();
|
|
|
|
// Select the type of root to use. Not thread-safe.
|
|
virtual util::Status SelectDrmCertificateType(CertificateType root_type);
|
|
|
|
// Verify VMP data and return appropriate result.
|
|
virtual util::Status VerifyVmpData(const std::string& vmp_data, Result* result);
|
|
|
|
// Enable/disable development code signing certificates.
|
|
void set_allow_development_vmp(bool allow) { allow_development_vmp_ = allow; }
|
|
bool allow_development_vmp() const { return allow_development_vmp_; }
|
|
|
|
private:
|
|
VmpChecker();
|
|
~VmpChecker();
|
|
|
|
std::unique_ptr<X509CA> ca_;
|
|
bool allow_development_vmp_ = false;
|
|
};
|
|
|
|
} // namespace widevine
|
|
|
|
#endif // COMMON_VMP_CHECKER_H_
|