WvPL License SDK release: 16.5.0
This commit is contained in:
@@ -37,6 +37,19 @@ void CopySecurityRequirement(
|
||||
video_widevine_server::wv_pl_sdk::WvPLSecurityProfile::SecurityRequirement*
|
||||
wvpl_security_requirement);
|
||||
|
||||
void CopyDeviceState(
|
||||
const video_widevine::DeviceState& device_state,
|
||||
video_widevine_server::wv_pl_sdk::DeviceState* wvpl_device_state);
|
||||
|
||||
void CppPlatformVerificationStatus(
|
||||
const video_widevine::PlatformVerificationStatus& vmp_status,
|
||||
video_widevine_server::wv_pl_sdk::PlatformVerificationStatus*
|
||||
wvpl_vmp_status);
|
||||
|
||||
void CopyBrowserRequirement(
|
||||
const video_widevine::BrowserRequirement& browser_requirements,
|
||||
video_widevine_server::wv_pl_sdk::WvPLSecurityProfile::BrowserRequirement*
|
||||
wvpl_browser_requirement);
|
||||
} // namespace wv_pl_sdk
|
||||
} // namespace video_widevine_server
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ class WvPLSDKEnvironment {
|
||||
public:
|
||||
WvPLSDKEnvironment();
|
||||
virtual ~WvPLSDKEnvironment();
|
||||
// TODO(b/193920474): This function will be non-static function since end-Q3
|
||||
// 2021 release.
|
||||
// Generates a license response containing a message generated in response to
|
||||
// an error condition. |create_session_status| is a previous error status
|
||||
// returned by the CreateSession(). |license_response| points to a std::string to
|
||||
@@ -70,6 +72,8 @@ class WvPLSDKEnvironment {
|
||||
const std::string& service_private_key,
|
||||
const std::string& service_private_key_passphrase);
|
||||
|
||||
// TODO(b/193920758): this function will be non private function since end-Q3
|
||||
// 2021 release.
|
||||
// Returns the DRM root certificate configured for this environment.
|
||||
const video_widevine::DrmRootCertificate* drm_root_certificate() const {
|
||||
return drm_root_certificate_.get();
|
||||
@@ -136,6 +140,13 @@ class WvPLSDKEnvironment {
|
||||
*/
|
||||
virtual WvPLStatus GetRequestAsString(const std::string& request,
|
||||
std::string* request_out) const;
|
||||
|
||||
/**
|
||||
* Generate a signed request to be sent to Widevine Certificate Provisioning
|
||||
* Server to retrieve 'DeviceCertificateStatusList'.
|
||||
*/
|
||||
virtual WvPLStatus GenerateDeviceStatusListRequest(
|
||||
std::string* signed_device_certificate_status_list_request) = 0;
|
||||
/**
|
||||
* Returns WvPLDeviceInfo for specific system_id.
|
||||
*/
|
||||
|
||||
108
ubuntu/sdk/external/common/wvpl/wvpl_types.h
vendored
108
ubuntu/sdk/external/common/wvpl/wvpl_types.h
vendored
@@ -45,6 +45,8 @@ enum KeyType {
|
||||
// for verifying the received ECM/EMM signature. Only EC key is supported
|
||||
// for now.
|
||||
PROVIDER_ECM_VERIFIER_PUBLIC_KEY = 4,
|
||||
// Wrapped key for auxiliary crypto operations.
|
||||
OPERATOR_SESSION = 5
|
||||
};
|
||||
|
||||
// A shortcut for specifying whether to return keys for the video feature only
|
||||
@@ -217,6 +219,21 @@ enum WvPLLicenseCategory {
|
||||
GROUP_LICENSE = 2,
|
||||
};
|
||||
|
||||
// DeviceState defines the current state of the device. It is used in
|
||||
// licensing to determine if a (classic or MDRM/CENC) license should be
|
||||
// issued. The status affects if and how a device record is shown in
|
||||
// keysmith's CertificateStatusList.
|
||||
enum DeviceState {
|
||||
DEVICE_STATE_UNKNOWN = 0,
|
||||
IN_TESTING = 1,
|
||||
RELEASED = 2,
|
||||
DELETED = 3,
|
||||
TEST_ONLY = 4,
|
||||
REVOKED = 5,
|
||||
PRE_RELEASE = 6,
|
||||
REVOKED_LICENSING = 7,
|
||||
};
|
||||
|
||||
/*
|
||||
* Defines the type wrapper for wvpl request.
|
||||
*/
|
||||
@@ -647,6 +664,30 @@ class WvPLOutputProtection {
|
||||
bool allow_record_;
|
||||
};
|
||||
|
||||
// Permissions specific to operator session keys.
|
||||
class WvPLSessionKeyPermissions {
|
||||
public:
|
||||
WvPLSessionKeyPermissions() {}
|
||||
|
||||
void set_allow_encrypt(bool flag) { allow_encrypt_ = flag; }
|
||||
bool allow_encrypt() const { return allow_encrypt_; }
|
||||
|
||||
void set_allow_decrypt(bool flag) { allow_decrypt_ = flag; }
|
||||
bool allow_decrypt() const { return allow_decrypt_; }
|
||||
|
||||
void set_allow_sign(bool flag) { allow_sign_ = flag; }
|
||||
bool allow_sign() const { return allow_sign_; }
|
||||
|
||||
void set_allow_signature_verify(bool flag) { allow_signature_verify_ = flag; }
|
||||
bool allow_signature_verify() const { return allow_signature_verify_; }
|
||||
|
||||
private:
|
||||
bool allow_encrypt_ = false;
|
||||
bool allow_decrypt_ = false;
|
||||
bool allow_sign_ = false;
|
||||
bool allow_signature_verify_ = false;
|
||||
};
|
||||
|
||||
class WvPLKey {
|
||||
public:
|
||||
WvPLKey() {}
|
||||
@@ -712,6 +753,14 @@ class WvPLKey {
|
||||
|
||||
KeyType key_type() const { return key_type_; }
|
||||
|
||||
void set_session_key_permissions(const WvPLSessionKeyPermissions& perm) {
|
||||
session_key_permissions_ = perm;
|
||||
}
|
||||
|
||||
const WvPLSessionKeyPermissions& session_key_permissions() const {
|
||||
return session_key_permissions_;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string key_id_;
|
||||
std::string key_bytes_;
|
||||
@@ -724,6 +773,8 @@ class WvPLKey {
|
||||
std::vector<WvPLVideoResolutionConstraint> video_resolution_constraints_;
|
||||
TrackType track_type_ = TRACK_TYPE_UNSPECIFIED;
|
||||
KeyType key_type_ = CONTENT;
|
||||
// Operator session key permissions.
|
||||
WvPLSessionKeyPermissions session_key_permissions_;
|
||||
};
|
||||
|
||||
class WvPLDeviceInfo {
|
||||
@@ -1473,6 +1524,23 @@ class WvPLSecurityProfile {
|
||||
AnalogOutputCapabilities analog_output_capabilities_;
|
||||
};
|
||||
|
||||
// List of required platform verification status based on VMP and remote
|
||||
// attestation.
|
||||
class BrowserRequirement {
|
||||
public:
|
||||
BrowserRequirement() {}
|
||||
|
||||
void add_vmp_statuses(const PlatformVerificationStatus& vmp_status) {
|
||||
vmp_statuses_.push_back(vmp_status);
|
||||
}
|
||||
const std::list<PlatformVerificationStatus>& vmp_statuses() const {
|
||||
return vmp_statuses_;
|
||||
}
|
||||
|
||||
private:
|
||||
std::list<PlatformVerificationStatus> vmp_statuses_;
|
||||
};
|
||||
|
||||
/*
|
||||
* Defines the security requirement for the Widevine security profile.
|
||||
*/
|
||||
@@ -1488,16 +1556,19 @@ class WvPLSecurityProfile {
|
||||
};
|
||||
|
||||
SecurityRequirement() {
|
||||
oem_crypto_version_ = 0;
|
||||
oem_crypto_api_major_version_ = 0;
|
||||
security_level_ = DEVICE_LEVEL_UNSPECIFIED;
|
||||
resource_rating_tier_ = 1;
|
||||
vulnerability_level_ = VULNERABILITY_LEVEL_UNSPECIFIED;
|
||||
verified_make_model_ = false;
|
||||
}
|
||||
|
||||
void set_oem_crypto_version(uint32_t oem_crypto_version) {
|
||||
oem_crypto_version_ = oem_crypto_version;
|
||||
void set_oem_crypto_api_major_version(uint32_t oem_crypto_api_major_version) {
|
||||
oem_crypto_api_major_version_ = oem_crypto_api_major_version;
|
||||
}
|
||||
uint32_t oem_crypto_api_major_version() const {
|
||||
return oem_crypto_api_major_version_;
|
||||
}
|
||||
uint32_t oem_crypto_version() const { return oem_crypto_version_; }
|
||||
|
||||
void set_security_level(const DeviceSecurityLevel& security_level) {
|
||||
security_level_ = security_level;
|
||||
@@ -1515,10 +1586,26 @@ class WvPLSecurityProfile {
|
||||
VulnerabilityLevel vulnerability_level() const {
|
||||
return vulnerability_level_;
|
||||
}
|
||||
void set_verified_make_model(bool verified_make_model) {
|
||||
verified_make_model_ = verified_make_model;
|
||||
}
|
||||
bool verified_make_model() const { return verified_make_model_; }
|
||||
void add_device_state(const DeviceState& device_state) {
|
||||
device_states_.push_back(device_state);
|
||||
}
|
||||
std::list<DeviceState> device_states() const { return device_states_; }
|
||||
|
||||
void set_browser_requirements(
|
||||
const BrowserRequirement& browser_requirements) {
|
||||
browser_requirements_ = browser_requirements;
|
||||
}
|
||||
BrowserRequirement browser_requirements() const {
|
||||
return browser_requirements_;
|
||||
}
|
||||
|
||||
private:
|
||||
// OEM Crypto version
|
||||
uint32_t oem_crypto_version_;
|
||||
// OEM Crypto API major version
|
||||
uint32_t oem_crypto_api_major_version_;
|
||||
// Device security level
|
||||
DeviceSecurityLevel security_level_;
|
||||
// OEM Crypto resource rating tier as per
|
||||
@@ -1529,6 +1616,13 @@ class WvPLSecurityProfile {
|
||||
uint32_t resource_rating_tier_;
|
||||
// Security vulnerability level.
|
||||
VulnerabilityLevel vulnerability_level_;
|
||||
// Verified make model (i.e. the device manufacturer has verified the make
|
||||
// model information).
|
||||
bool verified_make_model_;
|
||||
// Device states allowed for this profile.
|
||||
std::list<DeviceState> device_states_;
|
||||
// Platform verification requirements for devices using desktop browsers.
|
||||
BrowserRequirement browser_requirements_;
|
||||
};
|
||||
|
||||
class DeviceException {
|
||||
@@ -1628,6 +1722,7 @@ class WvPLSecurityProfile {
|
||||
void set_name(const std::string& name) { name_ = name; }
|
||||
const std::string& name() const { return name_; }
|
||||
|
||||
// Deprecated. Use SecurityRequirement.security_level instead.
|
||||
void set_level(Level level) { level_ = level; }
|
||||
Level level() const { return level_; }
|
||||
|
||||
@@ -1664,6 +1759,7 @@ class WvPLSecurityProfile {
|
||||
private:
|
||||
// Widevine security profile name.
|
||||
std::string name_;
|
||||
// Deprecated. Use SecurityRequirement.security_level instead.
|
||||
// Widevine security profile level.
|
||||
Level level_;
|
||||
// Output requirement for the Widevine security profile.
|
||||
|
||||
Reference in New Issue
Block a user