Fix media_cas_proxy_sdk build issue.
Add example binary for testing building the SDK after 'git clone' from our repo. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=227583629
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "util/status.h"
|
||||
#include "common/rsa_key.h"
|
||||
#include "common/status.h"
|
||||
#include "protos/public/client_identification.pb.h"
|
||||
#include "protos/public/license_protocol.pb.h"
|
||||
|
||||
@@ -29,15 +29,15 @@ class SignedDrmCertificate;
|
||||
class ClientCert {
|
||||
public:
|
||||
virtual ~ClientCert() {}
|
||||
static util::Status Create(
|
||||
static Status Create(
|
||||
const DrmRootCertificate* root_certificate,
|
||||
widevine::ClientIdentification::TokenType token_type,
|
||||
const std::string& token, ClientCert** client_cert);
|
||||
// Creates a Keybox based ClientCert.
|
||||
static util::Status CreateWithKeybox(const std::string& keybox_token,
|
||||
ClientCert** client_cert);
|
||||
static Status CreateWithKeybox(const std::string& keybox_token,
|
||||
ClientCert** client_cert);
|
||||
// Creates a Device Certificate based ClientCert.
|
||||
static util::Status CreateWithDrmCertificate(
|
||||
static Status CreateWithDrmCertificate(
|
||||
const DrmRootCertificate* root_certificate, const std::string& drm_certificate,
|
||||
ClientCert** client_cert);
|
||||
// Creates a HMAC SHA256 signature based on the message and the key().
|
||||
@@ -46,9 +46,8 @@ class ClientCert {
|
||||
// Checks the passed in signature against a signature created used the
|
||||
// classes information and the passed in message. Returns OK if signature
|
||||
// is valid.
|
||||
virtual util::Status VerifySignature(const std::string& message,
|
||||
const std::string& signature,
|
||||
ProtocolVersion protocol_version) = 0;
|
||||
virtual Status VerifySignature(const std::string& message, const std::string& signature,
|
||||
ProtocolVersion protocol_version) = 0;
|
||||
// Creates a signing_key that is accessible using signing_key(). Signing_key
|
||||
// is constructed by doing a key derivation using the key() and message.
|
||||
virtual void GenerateSigningKey(const std::string& message,
|
||||
@@ -118,10 +117,10 @@ class KeyboxClientCert : public ClientCert {
|
||||
static bool IsSystemIdKnown(const uint32_t system_id);
|
||||
static uint32_t GetSystemId(const std::string& keybox_bytes);
|
||||
|
||||
util::Status Initialize(const std::string& keybox_bytes);
|
||||
Status Initialize(const std::string& keybox_bytes);
|
||||
|
||||
util::Status VerifySignature(const std::string& message, const std::string& signature,
|
||||
ProtocolVersion protocol_version) override;
|
||||
Status VerifySignature(const std::string& message, const std::string& signature,
|
||||
ProtocolVersion protocol_version) override;
|
||||
const std::string& key() const override { return device_key_; }
|
||||
void set_key(const std::string& key) override { device_key_ = key; }
|
||||
const std::string& encrypted_key() const override { return encrypted_device_key_; }
|
||||
@@ -148,8 +147,8 @@ class CertificateClientCert : public ClientCert {
|
||||
public:
|
||||
~CertificateClientCert() override;
|
||||
|
||||
util::Status VerifySignature(const std::string& message, const std::string& signature,
|
||||
ProtocolVersion protocol_version) override;
|
||||
Status VerifySignature(const std::string& message, const std::string& signature,
|
||||
ProtocolVersion protocol_version) override;
|
||||
const std::string& key() const override { return session_key_; }
|
||||
void set_key(const std::string& key) override { session_key_ = key; }
|
||||
const std::string& encrypted_key() const override {
|
||||
@@ -162,8 +161,8 @@ class CertificateClientCert : public ClientCert {
|
||||
protected:
|
||||
friend class ClientCert;
|
||||
friend class MockCertificateClientCert;
|
||||
util::Status Initialize(const DrmRootCertificate* drm_root_certificate,
|
||||
const std::string& serialized_certificate);
|
||||
Status Initialize(const DrmRootCertificate* drm_root_certificate,
|
||||
const std::string& serialized_certificate);
|
||||
virtual void set_public_key(const std::string& public_key) {
|
||||
public_key_ = public_key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user