128 lines
4.6 KiB
C#
128 lines
4.6 KiB
C#
// using System;
|
|
// using System.Collections.Generic;
|
|
// using System.IO;
|
|
// using ProtoBuf;
|
|
//
|
|
// namespace CRD.Utils.DRM;
|
|
//
|
|
// public class ClientIdentification{
|
|
// /** Type of factory-provisioned device root of trust. Optional. */
|
|
// public ClientIdentification_TokenType type{ get; set; }
|
|
//
|
|
// /** Factory-provisioned device root of trust. Required. */
|
|
// public byte[] token{ get; set; }
|
|
//
|
|
// /** Optional client information name/value pairs. */
|
|
// public List<ClientIdentification_NameValue> clientInfo{ get; set; }
|
|
//
|
|
// /** Client token generated by the content provider. Optional. */
|
|
// public byte[] providerClientToken{ get; set; }
|
|
//
|
|
// /**
|
|
// * Number of licenses received by the client to which the token above belongs.
|
|
// * Only present if client_token is specified.
|
|
// */
|
|
// public double licenseCounter{ get; set; }
|
|
//
|
|
// /** List of non-baseline client capabilities. */
|
|
// public ClientIdentification_ClientCapabilities? clientCapabilities{ get; set; }
|
|
//
|
|
// /** Serialized VmpData message. Optional. */
|
|
// public byte[] vmpData{ get; set; }
|
|
//
|
|
// /** Optional field that may contain additional provisioning credentials. */
|
|
// public List<ClientIdentification_ClientCredentials> deviceCredentials{ get; set; }
|
|
//
|
|
// public static ClientIdentification decode(byte[] input){
|
|
// return Serializer.Deserialize<ClientIdentification>(new MemoryStream(input));
|
|
// }
|
|
// }
|
|
//
|
|
// public struct ClientIdentification_NameValue{
|
|
// public string name{ get; set; }
|
|
// public string value{ get; set; }
|
|
// }
|
|
//
|
|
// public enum ClientIdentification_TokenType{
|
|
// KEYBOX = 0,
|
|
// DRM_DEVICE_CERTIFICATE = 1,
|
|
// REMOTE_ATTESTATION_CERTIFICATE = 2,
|
|
// OEM_DEVICE_CERTIFICATE = 3,
|
|
// UNRECOGNIZED = -1
|
|
// }
|
|
//
|
|
// public struct ClientIdentification_ClientCredentials{
|
|
// public ClientIdentification_TokenType type{ get; set; }
|
|
// public byte[] token{ get; set; }
|
|
// }
|
|
//
|
|
// /**
|
|
// * Capabilities which not all clients may support. Used for the license
|
|
// * exchange protocol only.
|
|
// */
|
|
// public class ClientIdentification_ClientCapabilities{
|
|
// public bool clientToken{ get; set; }
|
|
// public bool sessionToken{ get; set; }
|
|
// public bool videoResolutionConstraints{ get; set; }
|
|
// public ClientIdentification_ClientCapabilities_HdcpVersion maxHdcpVersion{ get; set; }
|
|
// public double oemCryptoApiVersion{ get; set; }
|
|
//
|
|
// /**
|
|
// * Client has hardware support for protecting the usage table, such as
|
|
// * storing the generation number in secure memory. For Details, see:
|
|
// * Widevine Modular DRM Security Integration Guide for CENC
|
|
// */
|
|
// public bool antiRollbackUsageTable{ get; set; }
|
|
//
|
|
// /** The client shall report |srm_version| if available. */
|
|
// public double srmVersion{ get; set; }
|
|
//
|
|
// /**
|
|
// * A device may have SRM data, and report a version, but may not be capable
|
|
// * of updating SRM data.
|
|
// */
|
|
// public bool canUpdateSrm{ get; set; }
|
|
//
|
|
// public ClientIdentification_ClientCapabilities_CertificateKeyType[] supportedCertificateKeyType{ get; set; }
|
|
// public ClientIdentification_ClientCapabilities_AnalogOutputCapabilities analogOutputCapabilities{ get; set; }
|
|
// public bool canDisableAnalogOutput{ get; set; }
|
|
//
|
|
// /**
|
|
// * Clients can indicate a performance level supported by OEMCrypto.
|
|
// * This will allow applications and providers to choose an appropriate
|
|
// * quality of content to serve. Currently defined tiers are
|
|
// * 1 (low), 2 (medium) and 3 (high). Any other value indicates that
|
|
// * the resource rating is unavailable or reporting erroneous values
|
|
// * for that device. For details see,
|
|
// * Widevine Modular DRM Security Integration Guide for CENC
|
|
// */
|
|
// public double resourceRatingTier{ get; set; }
|
|
// }
|
|
//
|
|
// public enum ClientIdentification_ClientCapabilities_HdcpVersion{
|
|
// HDCP_NONE = 0,
|
|
// HDCP_V1 = 1,
|
|
// HDCP_V2 = 2,
|
|
// HDCP_V2_1 = 3,
|
|
// HDCP_V2_2 = 4,
|
|
// HDCP_V2_3 = 5,
|
|
// HDCP_NO_DIGITAL_OUTPUT = 255,
|
|
// UNRECOGNIZED = -1
|
|
// }
|
|
//
|
|
// public enum ClientIdentification_ClientCapabilities_AnalogOutputCapabilities{
|
|
// ANALOG_OUTPUT_UNKNOWN = 0,
|
|
// ANALOG_OUTPUT_NONE = 1,
|
|
// ANALOG_OUTPUT_SUPPORTED = 2,
|
|
// ANALOG_OUTPUT_SUPPORTS_CGMS_A = 3,
|
|
// UNRECOGNIZED = -1
|
|
// }
|
|
//
|
|
// public enum ClientIdentification_ClientCapabilities_CertificateKeyType{
|
|
// RSA_2048 = 0,
|
|
// RSA_3072 = 1,
|
|
// ECC_SECP256R1 = 2,
|
|
// ECC_SECP384R1 = 3,
|
|
// ECC_SECP521R1 = 4,
|
|
// UNRECOGNIZED = -1
|
|
// } |