diff --git a/modules/cdm.ts b/modules/cdm.ts index 7aded8a..607acfa 100644 --- a/modules/cdm.ts +++ b/modules/cdm.ts @@ -2,16 +2,14 @@ import fs from 'fs'; import { console } from './log'; import { workingDir } from './module.cfg-loader'; import path from 'path'; -import { KeyContainer, Session } from './widevine/license'; import * as reqModule from './module.fetch'; import Playready from 'node-playready'; +import Widevine, { KeyContainer, LicenseType } from 'widevine'; const req = new reqModule.Req(); //read cdm files located in the same directory -let privateKey: Buffer = Buffer.from([]), - identifierBlob: Buffer = Buffer.from([]), - prd_cdm: Playready | undefined; +let widevine: Widevine | undefined, playready: Playready | undefined; export let cdm: 'widevine' | 'playready'; export let canDecrypt: boolean; try { @@ -33,7 +31,7 @@ try { const zgpriv = fs.readFileSync(file_zgpriv); // Init Playready Client - prd_cdm = Playready.init(bgroup, zgpriv); + playready = Playready.init(bgroup, zgpriv); } } else if ((!bgroup_file_found || !zgpriv_file_found) && prd_file_found) { const file_prd = path.join(workingDir, 'playready', prd_file_found); @@ -55,13 +53,16 @@ try { console.warn('Converted deprecated .prd file into bgroupcert.dat and zgpriv.dat.'); - prd_cdm = Playready.init(parsed.bgroupcert, parsed.zgpriv); + playready = Playready.init(parsed.bgroupcert, parsed.zgpriv); } } catch (e) { console.error('Error loading Playready CDM. For more informations read the readme.'); console.error(e); } + let identifierBlob: Buffer = Buffer.from([]); + let privateKey: Buffer = Buffer.from([]); + const files_wvd = fs.readdirSync(path.join(workingDir, 'widevine')); try { files_wvd.forEach(function (file) { @@ -69,15 +70,15 @@ try { const stats = fs.statSync(file); if (stats.size < 1024 * 8 && stats.isFile()) { const fileContents = fs.readFileSync(file, { encoding: 'utf8' }); + if (fileContents.includes('widevine_cdm_version') && fileContents.includes('oem_crypto_security_patch_level') && !fileContents.startsWith('WVD')) { + identifierBlob = fs.readFileSync(file); + } if ( (fileContents.includes('-----BEGIN RSA PRIVATE KEY-----') && fileContents.includes('-----END RSA PRIVATE KEY-----')) || (fileContents.includes('-----BEGIN PRIVATE KEY-----') && fileContents.includes('-----END PRIVATE KEY-----')) ) { privateKey = fs.readFileSync(file); } - if (fileContents.includes('widevine_cdm_version') && fileContents.includes('oem_crypto_security_patch_level') && !fileContents.startsWith('WVD')) { - identifierBlob = fs.readFileSync(file); - } if (fileContents.startsWith('WVD')) { console.warn( 'Found WVD file in folder, AniDL currently only supports device_client_id_blob and device_private_key, make sure to have them in the widevine folder.' @@ -87,14 +88,15 @@ try { }); } catch (e) { console.error('Error loading Widevine CDM, malformed client blob or private key.'); - privateKey = Buffer.from([]); identifierBlob = Buffer.from([]); + privateKey = Buffer.from([]); } if (privateKey.length !== 0 && identifierBlob.length !== 0) { cdm = 'widevine'; + widevine = Widevine.init(identifierBlob, privateKey); canDecrypt = true; - } else if (prd_cdm) { + } else if (playready) { cdm = 'playready'; canDecrypt = true; } else if (privateKey.length === 0 && identifierBlob.length !== 0) { @@ -112,17 +114,17 @@ try { } export async function getKeysWVD(pssh: string | undefined, licenseServer: string, authData: Record): Promise { - if (!pssh || !canDecrypt) return []; + if (!pssh || !canDecrypt || !widevine) return []; // pssh found in the mpd manifest const psshBuffer = Buffer.from(pssh, 'base64'); // Create a new widevine session - const session = new Session({ privateKey, identifierBlob }, psshBuffer); + const session = widevine.createSession(psshBuffer, LicenseType.STREAMING); // Request License const licReq = await req.getData(licenseServer, { method: 'POST', - body: session.createLicenseRequest(), + body: session.generateChallenge(), headers: authData }); @@ -142,10 +144,10 @@ export async function getKeysWVD(pssh: string | undefined, licenseServer: string } export async function getKeysPRD(pssh: string | undefined, licenseServer: string, authData: Record): Promise { - if (!pssh || !canDecrypt || !prd_cdm) return []; + if (!pssh || !canDecrypt || !playready) return []; // Generate Playready challenge - const session = await prd_cdm.generateChallenge(pssh); + const session = playready.generateChallenge(pssh); // Fetch license const licReq = await req.getData(licenseServer, { @@ -161,7 +163,7 @@ export async function getKeysPRD(pssh: string | undefined, licenseServer: string // Parse License and return keys try { - const keys = await prd_cdm.parseLicense(Buffer.from(await licReq.res.text(), 'utf-8')); + const keys = playready.parseLicense(Buffer.from(await licReq.res.text(), 'utf-8')); return keys.map((k) => { return { kid: k.kid, diff --git a/modules/widevine/cmac.ts b/modules/widevine/cmac.ts deleted file mode 100644 index 9fcfcbc..0000000 --- a/modules/widevine/cmac.ts +++ /dev/null @@ -1,113 +0,0 @@ -// Modified version of https://github.com/Frooastside/node-widevine -import crypto from 'crypto'; - -export class AES_CMAC { - private readonly BLOCK_SIZE = 16; - private readonly XOR_RIGHT = Buffer.from([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87]); - private readonly EMPTY_BLOCK_SIZE_BUFFER = Buffer.alloc(this.BLOCK_SIZE) as Buffer; - - private _key: Buffer; - private _subkeys: { first: Buffer; second: Buffer }; - - public constructor(key: Buffer) { - if (![16, 24, 32].includes(key.length)) { - throw new Error('Key size must be 128, 192, or 256 bits.'); - } - this._key = key; - this._subkeys = this._generateSubkeys(); - } - - public calculate(message: Buffer): Buffer { - const blockCount = this._getBlockCount(message); - - let x = this.EMPTY_BLOCK_SIZE_BUFFER; - let y; - - for (let i = 0; i < blockCount - 1; i++) { - const from = i * this.BLOCK_SIZE; - const block = message.subarray(from, from + this.BLOCK_SIZE); - y = this._xor(x, block); - x = this._aes(y); - } - - y = this._xor(x, this._getLastBlock(message)); - x = this._aes(y); - - return x; - } - - private _generateSubkeys(): { first: Buffer; second: Buffer } { - const l = this._aes(this.EMPTY_BLOCK_SIZE_BUFFER); - - let first = this._bitShiftLeft(l); - if (l[0] & 0x80) { - first = this._xor(first, this.XOR_RIGHT); - } - - let second = this._bitShiftLeft(first); - if (first[0] & 0x80) { - second = this._xor(second, this.XOR_RIGHT); - } - - return { first: first, second: second }; - } - - private _getBlockCount(message: Buffer): number { - const blockCount = Math.ceil(message.length / this.BLOCK_SIZE); - return blockCount === 0 ? 1 : blockCount; - } - - private _aes(message: Buffer): Buffer { - const cipher = crypto.createCipheriv(`aes-${this._key.length * 8}-cbc`, this._key, Buffer.alloc(this.BLOCK_SIZE)); - const result = cipher.update(message).subarray(0, 16); - cipher.destroy(); - return result; - } - - private _getLastBlock(message: Buffer): Buffer { - const blockCount = this._getBlockCount(message); - const paddedBlock = this._padding(message, blockCount - 1); - - let complete = false; - if (message.length > 0) { - complete = message.length % this.BLOCK_SIZE === 0; - } - - const key = complete ? this._subkeys.first : this._subkeys.second; - return this._xor(paddedBlock, key); - } - - private _padding(message: Buffer, blockIndex: number): Buffer { - const block = Buffer.alloc(this.BLOCK_SIZE); - - const from = blockIndex * this.BLOCK_SIZE; - - const slice = message.subarray(from, from + this.BLOCK_SIZE); - block.set(slice); - - if (slice.length !== this.BLOCK_SIZE) { - block[slice.length] = 0x80; - } - - return block; - } - - private _bitShiftLeft(input: Buffer): Buffer { - const output = Buffer.alloc(input.length); - let overflow = 0; - for (let i = input.length - 1; i >= 0; i--) { - output[i] = (input[i] << 1) | overflow; - overflow = input[i] & 0x80 ? 1 : 0; - } - return output; - } - - private _xor(a: Buffer, b: Buffer): Buffer { - const length = Math.min(a.length, b.length); - const output = Buffer.alloc(length); - for (let i = 0; i < length; i++) { - output[i] = a[i] ^ b[i]; - } - return output; - } -} diff --git a/modules/widevine/license.ts b/modules/widevine/license.ts deleted file mode 100644 index 7362673..0000000 --- a/modules/widevine/license.ts +++ /dev/null @@ -1,303 +0,0 @@ -// Modified version of https://github.com/Frooastside/node-widevine - -import { AES_CMAC } from './cmac'; -import forge from 'node-forge'; -import { - ClientIdentification, - ClientIdentificationSchema, - DrmCertificateSchema, - EncryptedClientIdentification, - EncryptedClientIdentificationSchema, - LicenseRequest, - LicenseRequest_ContentIdentification_WidevinePsshDataSchema, - LicenseRequest_ContentIdentificationSchema, - LicenseRequest_RequestType, - LicenseRequestSchema, - LicenseSchema, - LicenseType, - ProtocolVersion, - SignedDrmCertificate, - SignedDrmCertificateSchema, - SignedMessage, - SignedMessage_MessageType, - SignedMessageSchema, - WidevinePsshData, - WidevinePsshDataSchema -} from './license_protocol_pb3'; -import { create, fromBinary, toBinary } from '@bufbuild/protobuf'; - -const WIDEVINE_SYSTEM_ID = new Uint8Array([0xed, 0xef, 0x8b, 0xa9, 0x79, 0xd6, 0x4a, 0xce, 0xa3, 0xc8, 0x27, 0xdc, 0xd5, 0x1d, 0x21, 0xed]); - -const WIDEVINE_ROOT_PUBLIC_KEY = new Uint8Array([ - 0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81, 0x00, 0xb4, 0xfe, 0x39, 0xc3, 0x65, 0x90, 0x03, 0xdb, 0x3c, 0x11, 0x97, 0x09, 0xe8, 0x68, 0xcd, 0xf2, 0xc3, 0x5e, 0x9b, 0xf2, - 0xe7, 0x4d, 0x23, 0xb1, 0x10, 0xdb, 0x87, 0x65, 0xdf, 0xdc, 0xfb, 0x9f, 0x35, 0xa0, 0x57, 0x03, 0x53, 0x4c, 0xf6, 0x6d, 0x35, 0x7d, 0xa6, 0x78, 0xdb, 0xb3, 0x36, 0xd2, 0x3f, - 0x9c, 0x40, 0xa9, 0x95, 0x26, 0x72, 0x7f, 0xb8, 0xbe, 0x66, 0xdf, 0xc5, 0x21, 0x98, 0x78, 0x15, 0x16, 0x68, 0x5d, 0x2f, 0x46, 0x0e, 0x43, 0xcb, 0x8a, 0x84, 0x39, 0xab, 0xfb, - 0xb0, 0x35, 0x80, 0x22, 0xbe, 0x34, 0x23, 0x8b, 0xab, 0x53, 0x5b, 0x72, 0xec, 0x4b, 0xb5, 0x48, 0x69, 0x53, 0x3e, 0x47, 0x5f, 0xfd, 0x09, 0xfd, 0xa7, 0x76, 0x13, 0x8f, 0x0f, - 0x92, 0xd6, 0x4c, 0xdf, 0xae, 0x76, 0xa9, 0xba, 0xd9, 0x22, 0x10, 0xa9, 0x9d, 0x71, 0x45, 0xd6, 0xd7, 0xe1, 0x19, 0x25, 0x85, 0x9c, 0x53, 0x9a, 0x97, 0xeb, 0x84, 0xd7, 0xcc, - 0xa8, 0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, 0x68, 0x15, 0x84, 0xff, 0xa5, 0x08, 0xfd, 0x18, 0xe7, 0xe7, 0x2b, 0xe4, 0x47, 0x27, 0x12, 0x11, 0xb8, - 0x23, 0xec, 0x58, 0x93, 0x3c, 0xac, 0x12, 0xd2, 0x88, 0x6d, 0x41, 0x3d, 0xc5, 0xfe, 0x1c, 0xdc, 0xb9, 0xf8, 0xd4, 0x51, 0x3e, 0x07, 0xe5, 0x03, 0x6f, 0xa7, 0x12, 0xe8, 0x12, - 0xf7, 0xb5, 0xce, 0xa6, 0x96, 0x55, 0x3f, 0x78, 0xb4, 0x64, 0x82, 0x50, 0xd2, 0x33, 0x5f, 0x91, 0x02, 0x03, 0x01, 0x00, 0x01 -]); - -export const SERVICE_CERTIFICATE_CHALLENGE = new Uint8Array([0x08, 0x04]); - -const COMMON_SERVICE_CERTIFICATE = new Uint8Array([ - 0x08, 0x05, 0x12, 0xc7, 0x05, 0x0a, 0xc1, 0x02, 0x08, 0x03, 0x12, 0x10, 0x17, 0x05, 0xb9, 0x17, 0xcc, 0x12, 0x04, 0x86, 0x8b, 0x06, 0x33, 0x3a, 0x2f, 0x77, 0x2a, 0x8c, 0x18, - 0x82, 0xb4, 0x82, 0x92, 0x05, 0x22, 0x8e, 0x02, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0x99, 0xed, 0x5b, 0x3b, 0x32, 0x7d, 0xab, 0x5e, 0x24, 0xef, 0xc3, 0xb6, - 0x2a, 0x95, 0xb5, 0x98, 0x52, 0x0a, 0xd5, 0xbc, 0xcb, 0x37, 0x50, 0x3e, 0x06, 0x45, 0xb8, 0x14, 0xd8, 0x76, 0xb8, 0xdf, 0x40, 0x51, 0x04, 0x41, 0xad, 0x8c, 0xe3, 0xad, 0xb1, - 0x1b, 0xb8, 0x8c, 0x4e, 0x72, 0x5a, 0x5e, 0x4a, 0x9e, 0x07, 0x95, 0x29, 0x1d, 0x58, 0x58, 0x40, 0x23, 0xa7, 0xe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xca, 0x5b, 0x25, 0x36, 0x0b, 0x76, 0x01, 0x5e, 0x9c, 0x5a, 0x06, 0xab, - 0x8e, 0xe0, 0x2f, 0x00, 0xd2, 0xe8, 0xd5, 0x98, 0x61, 0x04, 0xaa, 0xcc, 0x4d, 0xd4, 0x75, 0xfd, 0x96, 0xee, 0x9c, 0xe4, 0xe3, 0x26, 0xf2, 0x1b, 0x83, 0xc7, 0x05, 0x85, 0x77, - 0xb3, 0x87, 0x32, 0xcd, 0xda, 0xbc, 0x6a, 0x6b, 0xed, 0x13, 0xfb, 0x0d, 0x49, 0xd3, 0x8a, 0x45, 0xeb, 0x87, 0xa5, 0xf4 -]); - -export type KeyContainer = { - kid: string; - key: string; -}; - -export type ContentDecryptionModule = { - privateKey: Buffer; - identifierBlob: Buffer; -}; - -export class Session { - private _devicePrivateKey: forge.pki.rsa.PrivateKey; - private _identifierBlob: ClientIdentification; - private _pssh: Buffer; - private _rawLicenseRequest?: Buffer; - private _serviceCertificate?: SignedDrmCertificate; - - constructor(contentDecryptionModule: ContentDecryptionModule, pssh: Buffer) { - this._devicePrivateKey = forge.pki.privateKeyFromPem(contentDecryptionModule.privateKey.toString('binary')); - - this._identifierBlob = fromBinary(ClientIdentificationSchema, contentDecryptionModule.identifierBlob); - this._pssh = pssh; - } - - async setDefaultServiceCertificate() { - await this.setServiceCertificate(Buffer.from(COMMON_SERVICE_CERTIFICATE)); - } - - async setServiceCertificateFromMessage(rawSignedMessage: Buffer) { - const signedMessage: SignedMessage = fromBinary(SignedMessageSchema, rawSignedMessage); - if (!signedMessage.msg) { - throw new Error('the service certificate message does not contain a message'); - } - await this.setServiceCertificate(Buffer.from(signedMessage.msg)); - } - - async setServiceCertificate(serviceCertificate: Buffer) { - const signedServiceCertificate: SignedDrmCertificate = fromBinary(SignedDrmCertificateSchema, serviceCertificate); - if (!(await this._verifyServiceCertificate(signedServiceCertificate))) { - throw new Error('Service certificate is not signed by the Widevine root certificate'); - } - this._serviceCertificate = signedServiceCertificate; - } - - createLicenseRequest(licenseType: LicenseType = LicenseType.STREAMING, android: boolean = false): Buffer { - if (!this._pssh.subarray(12, 28).equals(Buffer.from(WIDEVINE_SYSTEM_ID))) { - throw new Error('the pssh is not an actuall pssh'); - } - - const pssh = this._parsePSSH(this._pssh); - if (!pssh) { - throw new Error('pssh is invalid'); - } - - const licenseRequest: LicenseRequest = create(LicenseRequestSchema, { - type: LicenseRequest_RequestType.NEW, - contentId: create(LicenseRequest_ContentIdentificationSchema, { - contentIdVariant: { - case: 'widevinePsshData', - value: create(LicenseRequest_ContentIdentification_WidevinePsshDataSchema, { - psshData: [this._pssh.subarray(32)], - licenseType: licenseType, - requestId: android ? this._generateAndroidIdentifier() : this._generateGenericIdentifier() - }) - } - }), - requestTime: BigInt(Date.now()) / BigInt(1000), - protocolVersion: ProtocolVersion.VERSION_2_1, - keyControlNonce: Math.floor(Math.random() * 2 ** 31) - }); - - if (this._serviceCertificate) { - const encryptedClientIdentification = this._encryptClientIdentification(this._identifierBlob, this._serviceCertificate); - licenseRequest.encryptedClientId = encryptedClientIdentification; - } else { - licenseRequest.clientId = this._identifierBlob; - } - - this._rawLicenseRequest = Buffer.from(toBinary(LicenseRequestSchema, licenseRequest)); - - const pss: forge.pss.PSS = forge.pss.create({ md: forge.md.sha1.create(), mgf: forge.mgf.mgf1.create(forge.md.sha1.create()), saltLength: 20 }); - const md = forge.md.sha1.create(); - md.update(this._rawLicenseRequest.toString('binary'), 'raw'); - const signature = Buffer.from(this._devicePrivateKey.sign(md, pss), 'binary'); - - const signedLicenseRequest: SignedMessage = create(SignedMessageSchema, { - type: SignedMessage_MessageType.LICENSE_REQUEST, - msg: this._rawLicenseRequest, - signature: signature - }); - - return Buffer.from(toBinary(SignedMessageSchema, signedLicenseRequest)); - } - - parseLicense(rawLicense: Buffer) { - if (!this._rawLicenseRequest) { - throw new Error('please request a license first'); - } - - const signedLicense = fromBinary(SignedMessageSchema, rawLicense); - if (!signedLicense.sessionKey) { - throw new Error('the license does not contain a session key'); - } - if (!signedLicense.msg) { - throw new Error('the license does not contain a message'); - } - if (!signedLicense.signature) { - throw new Error('the license does not contain a signature'); - } - - const sessionKey = this._devicePrivateKey.decrypt(Buffer.from(signedLicense.sessionKey).toString('binary'), 'RSA-OAEP', { - md: forge.md.sha1.create() - }); - - const cmac = new AES_CMAC(Buffer.from(sessionKey, 'binary')); - - const encKeyBase = Buffer.concat([Buffer.from('ENCRYPTION'), Buffer.from('\x00', 'ascii'), this._rawLicenseRequest, Buffer.from('\x00\x00\x00\x80', 'ascii')]); - const authKeyBase = Buffer.concat([Buffer.from('AUTHENTICATION'), Buffer.from('\x00', 'ascii'), this._rawLicenseRequest, Buffer.from('\x00\x00\x02\x00', 'ascii')]); - - const encKey = cmac.calculate(Buffer.concat([Buffer.from('\x01'), encKeyBase])); - const serverKey = Buffer.concat([cmac.calculate(Buffer.concat([Buffer.from('\x01'), authKeyBase])), cmac.calculate(Buffer.concat([Buffer.from('\x02'), authKeyBase]))]); - /*const clientKey = Buffer.concat([ - cmac.calculate(Buffer.concat([Buffer.from("\x03"), authKeyBase])), - cmac.calculate(Buffer.concat([Buffer.from("\x04"), authKeyBase])) - ]);*/ - - const hmac = forge.hmac.create(); - hmac.start(forge.md.sha256.create(), serverKey.toString('binary')); - hmac.update(Buffer.from(signedLicense.msg).toString('binary')); - const calculatedSignature = Buffer.from(hmac.digest().data, 'binary'); - - if (!calculatedSignature.equals(signedLicense.signature)) { - throw new Error('signatures do not match'); - } - - const license = fromBinary(LicenseSchema, signedLicense.msg); - - const keyContainers = license.key - .filter((k) => k.id) - .map((keyContainer) => { - if (keyContainer.type && keyContainer.key && keyContainer.iv) { - const keyId = Buffer.from(keyContainer.id!).toString('hex'); - const decipher = forge.cipher.createDecipher('AES-CBC', encKey.toString('binary')); - decipher.start({ iv: Buffer.from(keyContainer.iv).toString('binary') }); - decipher.update(forge.util.createBuffer(new Uint8Array(keyContainer.key))); - decipher.finish(); - const decryptedKey = Buffer.from(decipher.output.data, 'binary'); - const key: KeyContainer = { - kid: keyId, - key: decryptedKey.toString('hex') - }; - return key; - } - }); - if (keyContainers.filter((container) => !!container).length < 1) { - throw new Error('there was not a single valid key in the response'); - } - return keyContainers; - } - - private _encryptClientIdentification(clientIdentification: ClientIdentification, signedServiceCertificate: SignedDrmCertificate): EncryptedClientIdentification { - if (!signedServiceCertificate.drmCertificate) { - throw new Error('the service certificate does not contain an actual certificate'); - } - - const serviceCertificate = fromBinary(DrmCertificateSchema, signedServiceCertificate.drmCertificate); - if (!serviceCertificate.publicKey) { - throw new Error('the service certificate does not contain a public key'); - } - - const key = forge.random.getBytesSync(16); - const iv = forge.random.getBytesSync(16); - const cipher = forge.cipher.createCipher('AES-CBC', key); - cipher.start({ iv: iv }); - cipher.update(forge.util.createBuffer(toBinary(ClientIdentificationSchema, clientIdentification))); - cipher.finish(); - const rawEncryptedClientIdentification = Buffer.from(cipher.output.data, 'binary'); - - const publicKey = forge.pki.publicKeyFromAsn1(forge.asn1.fromDer(Buffer.from(serviceCertificate.publicKey).toString('binary'))); - const encryptedKey = publicKey.encrypt(key, 'RSA-OAEP', { md: forge.md.sha1.create() }); - - const encryptedClientIdentification: EncryptedClientIdentification = create(EncryptedClientIdentificationSchema, { - encryptedClientId: rawEncryptedClientIdentification, - encryptedClientIdIv: Buffer.from(iv, 'binary'), - encryptedPrivacyKey: Buffer.from(encryptedKey, 'binary'), - providerId: serviceCertificate.providerId, - serviceCertificateSerialNumber: serviceCertificate.serialNumber - }); - return encryptedClientIdentification; - } - - private async _verifyServiceCertificate(signedServiceCertificate: SignedDrmCertificate): Promise { - if (!signedServiceCertificate.drmCertificate) { - throw new Error('the service certificate does not contain an actual certificate'); - } - if (!signedServiceCertificate.signature) { - throw new Error('the service certificate does not contain a signature'); - } - - const publicKey = forge.pki.publicKeyFromAsn1(forge.asn1.fromDer(Buffer.from(WIDEVINE_ROOT_PUBLIC_KEY).toString('binary'))); - const pss: forge.pss.PSS = forge.pss.create({ md: forge.md.sha1.create(), mgf: forge.mgf.mgf1.create(forge.md.sha1.create()), saltLength: 20 }); - const sha1 = forge.md.sha1.create(); - sha1.update(Buffer.from(signedServiceCertificate.drmCertificate).toString('binary'), 'raw'); - return publicKey.verify(sha1.digest().bytes(), Buffer.from(signedServiceCertificate.signature).toString('binary'), pss); - } - - private _parsePSSH(pssh: Buffer): WidevinePsshData | null { - try { - return fromBinary(WidevinePsshDataSchema, pssh.subarray(32)); - } catch { - return null; - } - } - - private _generateAndroidIdentifier(): Buffer { - return Buffer.from(`${forge.util.bytesToHex(forge.random.getBytesSync(8))}${'01'}${'00000000000000'}`); - } - - private _generateGenericIdentifier(): Buffer { - return Buffer.from(forge.random.getBytesSync(16), 'binary'); - } - - get pssh(): Buffer { - return this._pssh; - } -} diff --git a/modules/widevine/license_protocol_pb3.ts b/modules/widevine/license_protocol_pb3.ts deleted file mode 100644 index e1cf9dd..0000000 --- a/modules/widevine/license_protocol_pb3.ts +++ /dev/null @@ -1,2455 +0,0 @@ -// @generated by protoc-gen-es v2.2.3 with parameter "target=ts" -// @generated from file license_protocol.proto (package license_protocol, syntax proto3) -/* eslint-disable */ - -import type { GenEnum, GenFile, GenMessage } from '@bufbuild/protobuf/codegenv1'; -import { enumDesc, fileDesc, messageDesc } from '@bufbuild/protobuf/codegenv1'; -import type { Message } from '@bufbuild/protobuf'; - -/** - * Describes the file license_protocol.proto. - */ -export const file_license_protocol: GenFile = - /*@__PURE__*/ - fileDesc( - 'ChZsaWNlbnNlX3Byb3RvY29sLnByb3RvEhBsaWNlbnNlX3Byb3RvY29sIq4CChVMaWNlbnNlSWRlbnRpZmljYXRpb24SFwoKcmVxdWVzdF9pZBgBIAEoDEgAiAEBEhcKCnNlc3Npb25faWQYAiABKAxIAYgBARIYCgtwdXJjaGFzZV9pZBgDIAEoDEgCiAEBEjAKBHR5cGUYBCABKA4yHS5saWNlbnNlX3Byb3RvY29sLkxpY2Vuc2VUeXBlSAOIAQESFAoHdmVyc2lvbhgFIAEoBUgEiAE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XJlEhUKCGZpbGVuYW1lGAEgASgJSACIAQESGQoMdGVzdF9zaWduaW5nGAIgASgISAGIAQESFwoKU0hBNTEySGFzaBgDIAEoDEgCiAEBEhUKCG1haW5fZXhlGAQgASgISAOIAQESFgoJc2lnbmF0dXJlGAUgASgMSASIAQFCCwoJX2ZpbGVuYW1lQg8KDV90ZXN0X3NpZ25pbmdCDQoLX1NIQTUxMkhhc2hCCwoJX21haW5fZXhlQgwKCl9zaWduYXR1cmVCCQoHX3NpZ25lcipUCgtMaWNlbnNlVHlwZRIaChZMSUNFTlNFVFlQRV9VTlZFUklGSUVEEAASDQoJU1RSRUFNSU5HEAESCwoHT0ZGTElORRACEg0KCUFVVE9NQVRJQxADKtkBChpQbGF0Zm9ybVZlcmlmaWNhdGlvblN0YXR1cxIXChNQTEFURk9STV9VTlZFUklGSUVEEAASFQoRUExBVEZPUk1fVEFNUEVSRUQQARIeChpQTEFURk9STV9TT0ZUV0FSRV9WRVJJRklFRBACEh4KGlBMQVRGT1JNX0hBUkRXQVJFX1ZFUklGSUVEEAMSHAoYUExBVEZPUk1fTk9fVkVSSUZJQ0FUSU9OEAQSLQopUExBVEZPUk1fU0VDVVJFX1NUT1JBR0VfU09GVFdBUkVfVkVSSUZJRUQQBSpcCg9Qcm90b2NvbFZlcnNpb24SFgoSVkVSU0lPTl9VTlZFUklGSUVEEAASDwoLVkVSU0lPTl8yXzAQFBIPCgtWRVJTSU9OXzJfMRAVEg8KC1ZFUlNJT05fMl8yEBYqhgEKEkhhc2hBbGdvcml0aG1Qcm90bxIeChpIQVNIX0FMR09SSVRITV9VTlNQRUNJRklFRBAAEhgKFEhBU0hfQUxHT1JJVEhNX1NIQV8xEAESGgoWSEFTSF9BTEdPUklUSE1fU0hBXzI1NhACEhoKFkhBU0hfQUxHT1JJVEhNX1NIQV8zODQQA2IGcHJvdG8z' - ); - -/** - * LicenseIdentification is propagated from LicenseRequest to License, - * incrementing version with each iteration. - * - * @generated from message license_protocol.LicenseIdentification - */ -export type LicenseIdentification = Message<'license_protocol.LicenseIdentification'> & { - /** - * @generated from field: optional bytes request_id = 1; - */ - requestId?: Uint8Array; - - /** - * @generated from field: optional bytes session_id = 2; - */ - sessionId?: Uint8Array; - - /** - * @generated from field: optional bytes purchase_id = 3; - */ - purchaseId?: Uint8Array; - - /** - * @generated from field: optional license_protocol.LicenseType type = 4; - */ - type?: LicenseType; - - /** - * @generated from field: optional int32 version = 5; - */ - version?: number; - - /** - * @generated from field: optional bytes provider_session_token = 6; - */ - providerSessionToken?: Uint8Array; -}; - -/** - * Describes the message license_protocol.LicenseIdentification. - * Use `create(LicenseIdentificationSchema)` to create a new message. - */ -export const LicenseIdentificationSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 0); - -/** - * @generated from message license_protocol.License - */ -export type License = Message<'license_protocol.License'> & { - /** - * @generated from field: optional license_protocol.LicenseIdentification id = 1; - */ - id?: LicenseIdentification; - - /** - * @generated from field: optional license_protocol.License.Policy policy = 2; - */ - policy?: License_Policy; - - /** - * @generated from field: repeated license_protocol.License.KeyContainer key = 3; - */ - key: License_KeyContainer[]; - - /** - * Time of the request in seconds (UTC) as set in - * LicenseRequest.request_time. If this time is not set in the request, - * the local time at the license service is used in this field. - * - * @generated from field: optional int64 license_start_time = 4; - */ - licenseStartTime?: bigint; - - /** - * @generated from field: optional bool remote_attestation_verified = 5; - */ - remoteAttestationVerified?: boolean; - - /** - * Client token generated by the content provider. Optional. - * - * @generated from field: optional bytes provider_client_token = 6; - */ - providerClientToken?: Uint8Array; - - /** - * 4cc code specifying the CENC protection scheme as defined in the CENC 3.0 - * specification. Propagated from Widevine PSSH box. Optional. - * - * @generated from field: optional uint32 protection_scheme = 7; - */ - protectionScheme?: number; - - /** - * 8 byte verification field "HDCPDATA" followed by unsigned 32 bit minimum - * HDCP SRM version (whether the version is for HDCP1 SRM or HDCP2 SRM - * depends on client max_hdcp_version). - * Additional details can be found in Widevine Modular DRM Security - * Integration Guide for CENC. - * - * @generated from field: optional bytes srm_requirement = 8; - */ - srmRequirement?: Uint8Array; - - /** - * If present this contains a signed SRM file (either HDCP1 SRM or HDCP2 SRM - * depending on client max_hdcp_version) that should be installed on the - * client device. - * - * @generated from field: optional bytes srm_update = 9; - */ - srmUpdate?: Uint8Array; - - /** - * Indicates the status of any type of platform verification performed by the - * server. - * - * @generated from field: optional license_protocol.PlatformVerificationStatus platform_verification_status = 10; - */ - platformVerificationStatus?: PlatformVerificationStatus; - - /** - * IDs of the groups for which keys are delivered in this license, if any. - * - * @generated from field: repeated bytes group_ids = 11; - */ - groupIds: Uint8Array[]; -}; - -/** - * Describes the message license_protocol.License. - * Use `create(LicenseSchema)` to create a new message. - */ -export const LicenseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 1); - -/** - * @generated from message license_protocol.License.Policy - */ -export type License_Policy = Message<'license_protocol.License.Policy'> & { - /** - * Indicates that playback of the content is allowed. - * - * @generated from field: optional bool can_play = 1; - */ - canPlay?: boolean; - - /** - * Indicates that the license may be persisted to non-volatile - * storage for offline use. - * - * @generated from field: optional bool can_persist = 2; - */ - canPersist?: boolean; - - /** - * Indicates that renewal of this license is allowed. - * - * @generated from field: optional bool can_renew = 3; - */ - canRenew?: boolean; - - /** - * Indicates the rental window. - * - * @generated from field: optional int64 rental_duration_seconds = 4; - */ - rentalDurationSeconds?: bigint; - - /** - * Indicates the viewing window, once playback has begun. - * - * @generated from field: optional int64 playback_duration_seconds = 5; - */ - playbackDurationSeconds?: bigint; - - /** - * Indicates the time window for this specific license. - * - * @generated from field: optional int64 license_duration_seconds = 6; - */ - licenseDurationSeconds?: bigint; - - /** - * The window of time, in which playback is allowed to continue while - * renewal is attempted, yet unsuccessful due to backend problems with - * the license server. - * - * @generated from field: optional int64 renewal_recovery_duration_seconds = 7; - */ - renewalRecoveryDurationSeconds?: bigint; - - /** - * All renewal requests for this license shall be directed to the - * specified URL. - * - * @generated from field: optional string renewal_server_url = 8; - */ - renewalServerUrl?: string; - - /** - * How many seconds after license_start_time, before renewal is first - * attempted. - * - * @generated from field: optional int64 renewal_delay_seconds = 9; - */ - renewalDelaySeconds?: bigint; - - /** - * Specifies the delay in seconds between subsequent license - * renewal requests, in case of failure. - * - * @generated from field: optional int64 renewal_retry_interval_seconds = 10; - */ - renewalRetryIntervalSeconds?: bigint; - - /** - * Indicates that the license shall be sent for renewal when usage is - * started. - * - * @generated from field: optional bool renew_with_usage = 11; - */ - renewWithUsage?: boolean; - - /** - * Indicates to client that license renewal and release requests ought to - * include ClientIdentification (client_id). - * - * @generated from field: optional bool always_include_client_id = 12; - */ - alwaysIncludeClientId?: boolean; - - /** - * Duration of grace period before playback_duration_seconds (short window) - * goes into effect. Optional. - * - * @generated from field: optional int64 play_start_grace_period_seconds = 13; - */ - playStartGracePeriodSeconds?: bigint; - - /** - * Enables "soft enforcement" of playback_duration_seconds, letting the user - * finish playback even if short window expires. Optional. - * - * @generated from field: optional bool soft_enforce_playback_duration = 14; - */ - softEnforcePlaybackDuration?: boolean; - - /** - * Enables "soft enforcement" of rental_duration_seconds. Initial playback - * must always start before rental duration expires. In order to allow - * subsequent playbacks to start after the rental duration expires, - * soft_enforce_playback_duration must be true. Otherwise, subsequent - * playbacks will not be allowed once rental duration expires. Optional. - * - * @generated from field: optional bool soft_enforce_rental_duration = 15; - */ - softEnforceRentalDuration?: boolean; -}; - -/** - * Describes the message license_protocol.License.Policy. - * Use `create(License_PolicySchema)` to create a new message. - */ -export const License_PolicySchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 1, 0); - -/** - * @generated from message license_protocol.License.KeyContainer - */ -export type License_KeyContainer = Message<'license_protocol.License.KeyContainer'> & { - /** - * @generated from field: optional bytes id = 1; - */ - id?: Uint8Array; - - /** - * @generated from field: optional bytes iv = 2; - */ - iv?: Uint8Array; - - /** - * @generated from field: optional bytes key = 3; - */ - key?: Uint8Array; - - /** - * @generated from field: optional license_protocol.License.KeyContainer.KeyType type = 4; - */ - type?: License_KeyContainer_KeyType; - - /** - * @generated from field: optional license_protocol.License.KeyContainer.SecurityLevel level = 5; - */ - level?: License_KeyContainer_SecurityLevel; - - /** - * @generated from field: optional license_protocol.License.KeyContainer.OutputProtection required_protection = 6; - */ - requiredProtection?: License_KeyContainer_OutputProtection; - - /** - * NOTE: Use of requested_protection is not recommended as it is only - * supported on a small number of platforms. - * - * @generated from field: optional license_protocol.License.KeyContainer.OutputProtection requested_protection = 7; - */ - requestedProtection?: License_KeyContainer_OutputProtection; - - /** - * @generated from field: optional license_protocol.License.KeyContainer.KeyControl key_control = 8; - */ - keyControl?: License_KeyContainer_KeyControl; - - /** - * @generated from field: optional license_protocol.License.KeyContainer.OperatorSessionKeyPermissions operator_session_key_permissions = 9; - */ - operatorSessionKeyPermissions?: License_KeyContainer_OperatorSessionKeyPermissions; - - /** - * Optional video resolution constraints. If the video resolution of the - * content being decrypted/decoded falls within one of the specified ranges, - * the optional required_protections may be applied. Otherwise an error will - * be reported. - * NOTE: Use of this feature is not recommended, as it is only supported on - * a small number of platforms. - * - * @generated from field: repeated license_protocol.License.KeyContainer.VideoResolutionConstraint video_resolution_constraints = 10; - */ - videoResolutionConstraints: License_KeyContainer_VideoResolutionConstraint[]; - - /** - * Optional flag to indicate the key must only be used if the client - * supports anti rollback of the user table. Content provider can query the - * client capabilities to determine if the client support this feature. - * - * @generated from field: optional bool anti_rollback_usage_table = 11; - */ - antiRollbackUsageTable?: boolean; - - /** - * Optional not limited to commonly known track types such as SD, HD. - * It can be some provider defined label to identify the track. - * - * @generated from field: optional string track_label = 12; - */ - trackLabel?: string; -}; - -/** - * Describes the message license_protocol.License.KeyContainer. - * Use `create(License_KeyContainerSchema)` to create a new message. - */ -export const License_KeyContainerSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 1, 1); - -/** - * @generated from message license_protocol.License.KeyContainer.KeyControl - */ -export type License_KeyContainer_KeyControl = Message<'license_protocol.License.KeyContainer.KeyControl'> & { - /** - * |key_control| is documented in: - * Widevine Modular DRM Security Integration Guide for CENC - * If present, the key control must be communicated to the secure - * environment prior to any usage. This message is automatically generated - * by the Widevine License Server SDK. - * - * @generated from field: optional bytes key_control_block = 1; - */ - keyControlBlock?: Uint8Array; - - /** - * @generated from field: optional bytes iv = 2; - */ - iv?: Uint8Array; -}; - -/** - * Describes the message license_protocol.License.KeyContainer.KeyControl. - * Use `create(License_KeyContainer_KeyControlSchema)` to create a new message. - */ -export const License_KeyContainer_KeyControlSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 1, 1, 0); - -/** - * @generated from message license_protocol.License.KeyContainer.OutputProtection - */ -export type License_KeyContainer_OutputProtection = Message<'license_protocol.License.KeyContainer.OutputProtection'> & { - /** - * @generated from field: optional license_protocol.License.KeyContainer.OutputProtection.HDCP hdcp = 1; - */ - hdcp?: License_KeyContainer_OutputProtection_HDCP; - - /** - * @generated from field: optional license_protocol.License.KeyContainer.OutputProtection.CGMS cgms_flags = 2; - */ - cgmsFlags?: License_KeyContainer_OutputProtection_CGMS; - - /** - * @generated from field: optional license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule hdcp_srm_rule = 3; - */ - hdcpSrmRule?: License_KeyContainer_OutputProtection_HdcpSrmRule; - - /** - * Optional requirement to indicate analog output is not allowed. - * - * @generated from field: optional bool disable_analog_output = 4; - */ - disableAnalogOutput?: boolean; - - /** - * Optional requirement to indicate digital output is not allowed. - * - * @generated from field: optional bool disable_digital_output = 5; - */ - disableDigitalOutput?: boolean; -}; - -/** - * Describes the message license_protocol.License.KeyContainer.OutputProtection. - * Use `create(License_KeyContainer_OutputProtectionSchema)` to create a new message. - */ -export const License_KeyContainer_OutputProtectionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 1, 1, 1); - -/** - * Indicates whether HDCP is required on digital outputs, and which - * version should be used. - * - * @generated from enum license_protocol.License.KeyContainer.OutputProtection.HDCP - */ -export enum License_KeyContainer_OutputProtection_HDCP { - /** - * @generated from enum value: HDCP_NONE = 0; - */ - HDCP_NONE = 0, - - /** - * @generated from enum value: HDCP_V1 = 1; - */ - HDCP_V1 = 1, - - /** - * @generated from enum value: HDCP_V2 = 2; - */ - HDCP_V2 = 2, - - /** - * @generated from enum value: HDCP_V2_1 = 3; - */ - HDCP_V2_1 = 3, - - /** - * @generated from enum value: HDCP_V2_2 = 4; - */ - HDCP_V2_2 = 4, - - /** - * @generated from enum value: HDCP_V2_3 = 5; - */ - HDCP_V2_3 = 5, - - /** - * @generated from enum value: HDCP_NO_DIGITAL_OUTPUT = 255; - */ - HDCP_NO_DIGITAL_OUTPUT = 255 -} - -/** - * Describes the enum license_protocol.License.KeyContainer.OutputProtection.HDCP. - */ -export const License_KeyContainer_OutputProtection_HDCPSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 1, 1, 1, 0); - -/** - * Indicate the CGMS setting to be inserted on analog output. - * - * @generated from enum license_protocol.License.KeyContainer.OutputProtection.CGMS - */ -export enum License_KeyContainer_OutputProtection_CGMS { - /** - * @generated from enum value: COPY_FREE = 0; - */ - COPY_FREE = 0, - - /** - * @generated from enum value: CGMS_NONE = 42; - */ - CGMS_NONE = 42, - - /** - * @generated from enum value: COPY_ONCE = 2; - */ - COPY_ONCE = 2, - - /** - * @generated from enum value: COPY_NEVER = 3; - */ - COPY_NEVER = 3 -} - -/** - * Describes the enum license_protocol.License.KeyContainer.OutputProtection.CGMS. - */ -export const License_KeyContainer_OutputProtection_CGMSSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 1, 1, 1, 1); - -/** - * @generated from enum license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule - */ -export enum License_KeyContainer_OutputProtection_HdcpSrmRule { - /** - * @generated from enum value: HDCP_SRM_RULE_NONE = 0; - */ - HDCP_SRM_RULE_NONE = 0, - - /** - * In 'required_protection', this means most current SRM is required. - * Update the SRM on the device. If update cannot happen, - * do not allow the key. - * In 'requested_protection', this means most current SRM is requested. - * Update the SRM on the device. If update cannot happen, - * allow use of the key anyway. - * - * @generated from enum value: CURRENT_SRM = 1; - */ - CURRENT_SRM = 1 -} - -/** - * Describes the enum license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule. - */ -export const License_KeyContainer_OutputProtection_HdcpSrmRuleSchema: GenEnum = - /*@__PURE__*/ - enumDesc(file_license_protocol, 1, 1, 1, 2); - -/** - * @generated from message license_protocol.License.KeyContainer.VideoResolutionConstraint - */ -export type License_KeyContainer_VideoResolutionConstraint = Message<'license_protocol.License.KeyContainer.VideoResolutionConstraint'> & { - /** - * Minimum and maximum video resolutions in the range (height x width). - * - * @generated from field: optional uint32 min_resolution_pixels = 1; - */ - minResolutionPixels?: number; - - /** - * @generated from field: optional uint32 max_resolution_pixels = 2; - */ - maxResolutionPixels?: number; - - /** - * Optional output protection requirements for this range. If not - * specified, the OutputProtection in the KeyContainer applies. - * - * @generated from field: optional license_protocol.License.KeyContainer.OutputProtection required_protection = 3; - */ - requiredProtection?: License_KeyContainer_OutputProtection; -}; - -/** - * Describes the message license_protocol.License.KeyContainer.VideoResolutionConstraint. - * Use `create(License_KeyContainer_VideoResolutionConstraintSchema)` to create a new message. - */ -export const License_KeyContainer_VideoResolutionConstraintSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_license_protocol, 1, 1, 2); - -/** - * @generated from message license_protocol.License.KeyContainer.OperatorSessionKeyPermissions - */ -export type License_KeyContainer_OperatorSessionKeyPermissions = Message<'license_protocol.License.KeyContainer.OperatorSessionKeyPermissions'> & { - /** - * Permissions/key usage flags for operator service keys - * (type = OPERATOR_SESSION). - * - * @generated from field: optional bool allow_encrypt = 1; - */ - allowEncrypt?: boolean; - - /** - * @generated from field: optional bool allow_decrypt = 2; - */ - allowDecrypt?: boolean; - - /** - * @generated from field: optional bool allow_sign = 3; - */ - allowSign?: boolean; - - /** - * @generated from field: optional bool allow_signature_verify = 4; - */ - allowSignatureVerify?: boolean; -}; - -/** - * Describes the message license_protocol.License.KeyContainer.OperatorSessionKeyPermissions. - * Use `create(License_KeyContainer_OperatorSessionKeyPermissionsSchema)` to create a new message. - */ -export const License_KeyContainer_OperatorSessionKeyPermissionsSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_license_protocol, 1, 1, 3); - -/** - * @generated from enum license_protocol.License.KeyContainer.KeyType - */ -export enum License_KeyContainer_KeyType { - /** - * @generated from enum value: KEYTYPE_UNVERIFIED = 0; - */ - KEYTYPE_UNVERIFIED = 0, - - /** - * Exactly one key of this type must appear. - * - * @generated from enum value: SIGNING = 1; - */ - SIGNING = 1, - - /** - * Content key. - * - * @generated from enum value: CONTENT = 2; - */ - CONTENT = 2, - - /** - * Key control block for license renewals. No key. - * - * @generated from enum value: KEY_CONTROL = 3; - */ - KEY_CONTROL = 3, - - /** - * wrapped keys for auxiliary crypto operations. - * - * @generated from enum value: OPERATOR_SESSION = 4; - */ - OPERATOR_SESSION = 4, - - /** - * Entitlement keys. - * - * @generated from enum value: ENTITLEMENT = 5; - */ - ENTITLEMENT = 5, - - /** - * Partner-specific content key. - * - * @generated from enum value: OEM_CONTENT = 6; - */ - OEM_CONTENT = 6 -} - -/** - * Describes the enum license_protocol.License.KeyContainer.KeyType. - */ -export const License_KeyContainer_KeyTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 1, 1, 0); - -/** - * The SecurityLevel enumeration allows the server to communicate the level - * of robustness required by the client, in order to use the key. - * - * @generated from enum license_protocol.License.KeyContainer.SecurityLevel - */ -export enum License_KeyContainer_SecurityLevel { - /** - * @generated from enum value: SECURITYLEVEL_UNVERIFIED = 0; - */ - SECURITYLEVEL_UNVERIFIED = 0, - - /** - * Software-based whitebox crypto is required. - * - * @generated from enum value: SW_SECURE_CRYPTO = 1; - */ - SW_SECURE_CRYPTO = 1, - - /** - * Software crypto and an obfuscated decoder is required. - * - * @generated from enum value: SW_SECURE_DECODE = 2; - */ - SW_SECURE_DECODE = 2, - - /** - * The key material and crypto operations must be performed within a - * hardware backed trusted execution environment. - * - * @generated from enum value: HW_SECURE_CRYPTO = 3; - */ - HW_SECURE_CRYPTO = 3, - - /** - * The crypto and decoding of content must be performed within a hardware - * backed trusted execution environment. - * - * @generated from enum value: HW_SECURE_DECODE = 4; - */ - HW_SECURE_DECODE = 4, - - /** - * The crypto, decoding and all handling of the media (compressed and - * uncompressed) must be handled within a hardware backed trusted - * execution environment. - * - * @generated from enum value: HW_SECURE_ALL = 5; - */ - HW_SECURE_ALL = 5 -} - -/** - * Describes the enum license_protocol.License.KeyContainer.SecurityLevel. - */ -export const License_KeyContainer_SecurityLevelSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 1, 1, 1); - -/** - * @generated from message license_protocol.LicenseRequest - */ -export type LicenseRequest = Message<'license_protocol.LicenseRequest'> & { - /** - * The client_id provides information authenticating the calling device. It - * contains the Widevine keybox token that was installed on the device at the - * factory. This field or encrypted_client_id below is required for a valid - * license request, but both should never be present in the same request. - * - * @generated from field: optional license_protocol.ClientIdentification client_id = 1; - */ - clientId?: ClientIdentification; - - /** - * @generated from field: optional license_protocol.LicenseRequest.ContentIdentification content_id = 2; - */ - contentId?: LicenseRequest_ContentIdentification; - - /** - * @generated from field: optional license_protocol.LicenseRequest.RequestType type = 3; - */ - type?: LicenseRequest_RequestType; - - /** - * Time of the request in seconds (UTC) as set by the client. - * - * @generated from field: optional int64 request_time = 4; - */ - requestTime?: bigint; - - /** - * Old-style decimal-encoded string key control nonce. - * - * @generated from field: optional bytes key_control_nonce_deprecated = 5; - */ - keyControlNonceDeprecated?: Uint8Array; - - /** - * @generated from field: optional license_protocol.ProtocolVersion protocol_version = 6; - */ - protocolVersion?: ProtocolVersion; - - /** - * New-style uint32 key control nonce, please use instead of - * key_control_nonce_deprecated. - * - * @generated from field: optional uint32 key_control_nonce = 7; - */ - keyControlNonce?: number; - - /** - * Encrypted ClientIdentification message, used for privacy purposes. - * - * @generated from field: optional license_protocol.EncryptedClientIdentification encrypted_client_id = 8; - */ - encryptedClientId?: EncryptedClientIdentification; -}; - -/** - * Describes the message license_protocol.LicenseRequest. - * Use `create(LicenseRequestSchema)` to create a new message. - */ -export const LicenseRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 2); - -/** - * @generated from message license_protocol.LicenseRequest.ContentIdentification - */ -export type LicenseRequest_ContentIdentification = Message<'license_protocol.LicenseRequest.ContentIdentification'> & { - /** - * @generated from oneof license_protocol.LicenseRequest.ContentIdentification.content_id_variant - */ - contentIdVariant: - | { - /** - * Exactly one of these must be present. - * - * @generated from field: license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData widevine_pssh_data = 1; - */ - value: LicenseRequest_ContentIdentification_WidevinePsshData; - case: 'widevinePsshData'; - } - | { - /** - * @generated from field: license_protocol.LicenseRequest.ContentIdentification.WebmKeyId webm_key_id = 2; - */ - value: LicenseRequest_ContentIdentification_WebmKeyId; - case: 'webmKeyId'; - } - | { - /** - * @generated from field: license_protocol.LicenseRequest.ContentIdentification.ExistingLicense existing_license = 3; - */ - value: LicenseRequest_ContentIdentification_ExistingLicense; - case: 'existingLicense'; - } - | { - /** - * @generated from field: license_protocol.LicenseRequest.ContentIdentification.InitData init_data = 4; - */ - value: LicenseRequest_ContentIdentification_InitData; - case: 'initData'; - } - | { case: undefined; value?: undefined }; -}; - -/** - * Describes the message license_protocol.LicenseRequest.ContentIdentification. - * Use `create(LicenseRequest_ContentIdentificationSchema)` to create a new message. - */ -export const LicenseRequest_ContentIdentificationSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 2, 0); - -/** - * @generated from message license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData - */ -export type LicenseRequest_ContentIdentification_WidevinePsshData = Message<'license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData'> & { - /** - * @generated from field: repeated bytes pssh_data = 1; - */ - psshData: Uint8Array[]; - - /** - * @generated from field: optional license_protocol.LicenseType license_type = 2; - */ - licenseType?: LicenseType; - - /** - * Opaque, client-specified. - * - * @generated from field: optional bytes request_id = 3; - */ - requestId?: Uint8Array; -}; - -/** - * Describes the message license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData. - * Use `create(LicenseRequest_ContentIdentification_WidevinePsshDataSchema)` to create a new message. - */ -export const LicenseRequest_ContentIdentification_WidevinePsshDataSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_license_protocol, 2, 0, 0); - -/** - * @generated from message license_protocol.LicenseRequest.ContentIdentification.WebmKeyId - */ -export type LicenseRequest_ContentIdentification_WebmKeyId = Message<'license_protocol.LicenseRequest.ContentIdentification.WebmKeyId'> & { - /** - * @generated from field: optional bytes header = 1; - */ - header?: Uint8Array; - - /** - * @generated from field: optional license_protocol.LicenseType license_type = 2; - */ - licenseType?: LicenseType; - - /** - * Opaque, client-specified. - * - * @generated from field: optional bytes request_id = 3; - */ - requestId?: Uint8Array; -}; - -/** - * Describes the message license_protocol.LicenseRequest.ContentIdentification.WebmKeyId. - * Use `create(LicenseRequest_ContentIdentification_WebmKeyIdSchema)` to create a new message. - */ -export const LicenseRequest_ContentIdentification_WebmKeyIdSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_license_protocol, 2, 0, 1); - -/** - * @generated from message license_protocol.LicenseRequest.ContentIdentification.ExistingLicense - */ -export type LicenseRequest_ContentIdentification_ExistingLicense = Message<'license_protocol.LicenseRequest.ContentIdentification.ExistingLicense'> & { - /** - * @generated from field: optional license_protocol.LicenseIdentification license_id = 1; - */ - licenseId?: LicenseIdentification; - - /** - * @generated from field: optional int64 seconds_since_started = 2; - */ - secondsSinceStarted?: bigint; - - /** - * @generated from field: optional int64 seconds_since_last_played = 3; - */ - secondsSinceLastPlayed?: bigint; - - /** - * @generated from field: optional bytes session_usage_table_entry = 4; - */ - sessionUsageTableEntry?: Uint8Array; -}; - -/** - * Describes the message license_protocol.LicenseRequest.ContentIdentification.ExistingLicense. - * Use `create(LicenseRequest_ContentIdentification_ExistingLicenseSchema)` to create a new message. - */ -export const LicenseRequest_ContentIdentification_ExistingLicenseSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_license_protocol, 2, 0, 2); - -/** - * @generated from message license_protocol.LicenseRequest.ContentIdentification.InitData - */ -export type LicenseRequest_ContentIdentification_InitData = Message<'license_protocol.LicenseRequest.ContentIdentification.InitData'> & { - /** - * @generated from field: optional license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType init_data_type = 1; - */ - initDataType?: LicenseRequest_ContentIdentification_InitData_InitDataType; - - /** - * @generated from field: optional bytes init_data = 2; - */ - initData?: Uint8Array; - - /** - * @generated from field: optional license_protocol.LicenseType license_type = 3; - */ - licenseType?: LicenseType; - - /** - * @generated from field: optional bytes request_id = 4; - */ - requestId?: Uint8Array; -}; - -/** - * Describes the message license_protocol.LicenseRequest.ContentIdentification.InitData. - * Use `create(LicenseRequest_ContentIdentification_InitDataSchema)` to create a new message. - */ -export const LicenseRequest_ContentIdentification_InitDataSchema: GenMessage = - /*@__PURE__*/ - messageDesc(file_license_protocol, 2, 0, 3); - -/** - * @generated from enum license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType - */ -export enum LicenseRequest_ContentIdentification_InitData_InitDataType { - /** - * @generated from enum value: INITDATATYPE_UNVERIFIED = 0; - */ - INITDATATYPE_UNVERIFIED = 0, - - /** - * @generated from enum value: CENC = 1; - */ - CENC = 1, - - /** - * @generated from enum value: WEBM = 2; - */ - WEBM = 2 -} - -/** - * Describes the enum license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType. - */ -export const LicenseRequest_ContentIdentification_InitData_InitDataTypeSchema: GenEnum = - /*@__PURE__*/ - enumDesc(file_license_protocol, 2, 0, 3, 0); - -/** - * @generated from enum license_protocol.LicenseRequest.RequestType - */ -export enum LicenseRequest_RequestType { - /** - * @generated from enum value: REQUESTTYPE_UNVERIFIED = 0; - */ - REQUESTTYPE_UNVERIFIED = 0, - - /** - * @generated from enum value: NEW = 1; - */ - NEW = 1, - - /** - * @generated from enum value: RENEWAL = 2; - */ - RENEWAL = 2, - - /** - * @generated from enum value: RELEASE = 3; - */ - RELEASE = 3 -} - -/** - * Describes the enum license_protocol.LicenseRequest.RequestType. - */ -export const LicenseRequest_RequestTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 2, 0); - -/** - * @generated from message license_protocol.MetricData - */ -export type MetricData = Message<'license_protocol.MetricData'> & { - /** - * 'stage' that is currently processing the SignedMessage. Required. - * - * @generated from field: optional string stage_name = 1; - */ - stageName?: string; - - /** - * metric and associated value. - * - * @generated from field: repeated license_protocol.MetricData.TypeValue metric_data = 2; - */ - metricData: MetricData_TypeValue[]; -}; - -/** - * Describes the message license_protocol.MetricData. - * Use `create(MetricDataSchema)` to create a new message. - */ -export const MetricDataSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 3); - -/** - * @generated from message license_protocol.MetricData.TypeValue - */ -export type MetricData_TypeValue = Message<'license_protocol.MetricData.TypeValue'> & { - /** - * @generated from field: optional license_protocol.MetricData.MetricType type = 1; - */ - type?: MetricData_MetricType; - - /** - * The value associated with 'type'. For example if type == LATENCY, the - * value would be the time in microseconds spent in this 'stage'. - * - * @generated from field: optional int64 value = 2; - */ - value?: bigint; -}; - -/** - * Describes the message license_protocol.MetricData.TypeValue. - * Use `create(MetricData_TypeValueSchema)` to create a new message. - */ -export const MetricData_TypeValueSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 3, 0); - -/** - * @generated from enum license_protocol.MetricData.MetricType - */ -export enum MetricData_MetricType { - /** - * @generated from enum value: METRICTYPE_UNVERIFIED = 0; - */ - METRICTYPE_UNVERIFIED = 0, - - /** - * The time spent in the 'stage', specified in microseconds. - * - * @generated from enum value: LATENCY = 1; - */ - LATENCY = 1, - - /** - * The UNIX epoch timestamp at which the 'stage' was first accessed in - * microseconds. - * - * @generated from enum value: TIMESTAMP = 2; - */ - TIMESTAMP = 2 -} - -/** - * Describes the enum license_protocol.MetricData.MetricType. - */ -export const MetricData_MetricTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 3, 0); - -/** - * @generated from message license_protocol.VersionInfo - */ -export type VersionInfo = Message<'license_protocol.VersionInfo'> & { - /** - * License SDK version reported by the Widevine License SDK. This field - * is populated automatically by the SDK. - * - * @generated from field: optional string license_sdk_version = 1; - */ - licenseSdkVersion?: string; - - /** - * Version of the service hosting the license SDK. This field is optional. - * It may be provided by the hosting service. - * - * @generated from field: optional string license_service_version = 2; - */ - licenseServiceVersion?: string; -}; - -/** - * Describes the message license_protocol.VersionInfo. - * Use `create(VersionInfoSchema)` to create a new message. - */ -export const VersionInfoSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 4); - -/** - * @generated from message license_protocol.SignedMessage - */ -export type SignedMessage = Message<'license_protocol.SignedMessage'> & { - /** - * @generated from field: optional license_protocol.SignedMessage.MessageType type = 1; - */ - type?: SignedMessage_MessageType; - - /** - * @generated from field: optional bytes msg = 2; - */ - msg?: Uint8Array; - - /** - * Required field that contains the signature of the bytes of msg. - * For license requests, the signing algorithm is determined by the - * certificate contained in the request. - * For license responses, the signing algorithm is HMAC with signing key based - * on |session_key|. - * - * @generated from field: optional bytes signature = 3; - */ - signature?: Uint8Array; - - /** - * If populated, the contents of this field will be signaled by the - * |session_key_type| type. If the |session_key_type| is WRAPPED_AES_KEY the - * key is the bytes of an encrypted AES key. If the |session_key_type| is - * EPHERMERAL_ECC_PUBLIC_KEY the field contains the bytes of an RFC5208 ASN1 - * serialized ECC public key. - * - * @generated from field: optional bytes session_key = 4; - */ - sessionKey?: Uint8Array; - - /** - * Remote attestation data which will be present in the initial license - * request for ChromeOS client devices operating in verified mode. Remote - * attestation challenge data is |msg| field above. Optional. - * - * @generated from field: optional bytes remote_attestation = 5; - */ - remoteAttestation?: Uint8Array; - - /** - * @generated from field: repeated license_protocol.MetricData metric_data = 6; - */ - metricData: MetricData[]; - - /** - * Version information from the SDK and license service. This information is - * provided in the license response. - * - * @generated from field: optional license_protocol.VersionInfo service_version_info = 7; - */ - serviceVersionInfo?: VersionInfo; - - /** - * Optional field that contains the algorithm type used to generate the - * session_key and signature in a LICENSE message. - * - * @generated from field: optional license_protocol.SignedMessage.SessionKeyType session_key_type = 8; - */ - sessionKeyType?: SignedMessage_SessionKeyType; - - /** - * The core message is the simple serialization of fields used by OEMCrypto. - * This field was introduced in OEMCrypto API v16. - * - * @generated from field: optional bytes oemcrypto_core_message = 9; - */ - oemcryptoCoreMessage?: Uint8Array; -}; - -/** - * Describes the message license_protocol.SignedMessage. - * Use `create(SignedMessageSchema)` to create a new message. - */ -export const SignedMessageSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 5); - -/** - * @generated from enum license_protocol.SignedMessage.MessageType - */ -export enum SignedMessage_MessageType { - /** - * @generated from enum value: MESSAGETYPE_UNVERIFIED = 0; - */ - MESSAGETYPE_UNVERIFIED = 0, - - /** - * @generated from enum value: LICENSE_REQUEST = 1; - */ - LICENSE_REQUEST = 1, - - /** - * @generated from enum value: LICENSE = 2; - */ - LICENSE = 2, - - /** - * @generated from enum value: ERROR_RESPONSE = 3; - */ - ERROR_RESPONSE = 3, - - /** - * @generated from enum value: SERVICE_CERTIFICATE_REQUEST = 4; - */ - SERVICE_CERTIFICATE_REQUEST = 4, - - /** - * @generated from enum value: SERVICE_CERTIFICATE = 5; - */ - SERVICE_CERTIFICATE = 5, - - /** - * @generated from enum value: SUB_LICENSE = 6; - */ - SUB_LICENSE = 6, - - /** - * @generated from enum value: CAS_LICENSE_REQUEST = 7; - */ - CAS_LICENSE_REQUEST = 7, - - /** - * @generated from enum value: CAS_LICENSE = 8; - */ - CAS_LICENSE = 8, - - /** - * @generated from enum value: EXTERNAL_LICENSE_REQUEST = 9; - */ - EXTERNAL_LICENSE_REQUEST = 9, - - /** - * @generated from enum value: EXTERNAL_LICENSE = 10; - */ - EXTERNAL_LICENSE = 10 -} - -/** - * Describes the enum license_protocol.SignedMessage.MessageType. - */ -export const SignedMessage_MessageTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 5, 0); - -/** - * @generated from enum license_protocol.SignedMessage.SessionKeyType - */ -export enum SignedMessage_SessionKeyType { - /** - * @generated from enum value: UNDEFINED = 0; - */ - UNDEFINED = 0, - - /** - * @generated from enum value: WRAPPED_AES_KEY = 1; - */ - WRAPPED_AES_KEY = 1, - - /** - * @generated from enum value: EPHERMERAL_ECC_PUBLIC_KEY = 2; - */ - EPHERMERAL_ECC_PUBLIC_KEY = 2 -} - -/** - * Describes the enum license_protocol.SignedMessage.SessionKeyType. - */ -export const SignedMessage_SessionKeyTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 5, 1); - -/** - * ClientIdentification message used to authenticate the client device. - * - * @generated from message license_protocol.ClientIdentification - */ -export type ClientIdentification = Message<'license_protocol.ClientIdentification'> & { - /** - * Type of factory-provisioned device root of trust. Optional. - * - * @generated from field: optional license_protocol.ClientIdentification.TokenType type = 1; - */ - type?: ClientIdentification_TokenType; - - /** - * Factory-provisioned device root of trust. Required. - * - * @generated from field: optional bytes token = 2; - */ - token?: Uint8Array; - - /** - * Optional client information name/value pairs. - * - * @generated from field: repeated license_protocol.ClientIdentification.NameValue client_info = 3; - */ - clientInfo: ClientIdentification_NameValue[]; - - /** - * Client token generated by the content provider. Optional. - * - * @generated from field: optional bytes provider_client_token = 4; - */ - providerClientToken?: Uint8Array; - - /** - * Number of licenses received by the client to which the token above belongs. - * Only present if client_token is specified. - * - * @generated from field: optional uint32 license_counter = 5; - */ - licenseCounter?: number; - - /** - * List of non-baseline client capabilities. - * - * @generated from field: optional license_protocol.ClientIdentification.ClientCapabilities client_capabilities = 6; - */ - clientCapabilities?: ClientIdentification_ClientCapabilities; - - /** - * Serialized VmpData message. Optional. - * - * @generated from field: optional bytes vmp_data = 7; - */ - vmpData?: Uint8Array; - - /** - * Optional field that may contain additional provisioning credentials. - * - * @generated from field: repeated license_protocol.ClientIdentification.ClientCredentials device_credentials = 8; - */ - deviceCredentials: ClientIdentification_ClientCredentials[]; -}; - -/** - * Describes the message license_protocol.ClientIdentification. - * Use `create(ClientIdentificationSchema)` to create a new message. - */ -export const ClientIdentificationSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 6); - -/** - * @generated from message license_protocol.ClientIdentification.NameValue - */ -export type ClientIdentification_NameValue = Message<'license_protocol.ClientIdentification.NameValue'> & { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; -}; - -/** - * Describes the message license_protocol.ClientIdentification.NameValue. - * Use `create(ClientIdentification_NameValueSchema)` to create a new message. - */ -export const ClientIdentification_NameValueSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 6, 0); - -/** - * Capabilities which not all clients may support. Used for the license - * exchange protocol only. - * - * @generated from message license_protocol.ClientIdentification.ClientCapabilities - */ -export type ClientIdentification_ClientCapabilities = Message<'license_protocol.ClientIdentification.ClientCapabilities'> & { - /** - * @generated from field: optional bool client_token = 1; - */ - clientToken?: boolean; - - /** - * @generated from field: optional bool session_token = 2; - */ - sessionToken?: boolean; - - /** - * @generated from field: optional bool video_resolution_constraints = 3; - */ - videoResolutionConstraints?: boolean; - - /** - * @generated from field: optional license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion max_hdcp_version = 4; - */ - maxHdcpVersion?: ClientIdentification_ClientCapabilities_HdcpVersion; - - /** - * @generated from field: optional uint32 oem_crypto_api_version = 5; - */ - oemCryptoApiVersion?: number; - - /** - * 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 - * - * @generated from field: optional bool anti_rollback_usage_table = 6; - */ - antiRollbackUsageTable?: boolean; - - /** - * The client shall report |srm_version| if available. - * - * @generated from field: optional uint32 srm_version = 7; - */ - srmVersion?: number; - - /** - * A device may have SRM data, and report a version, but may not be capable - * of updating SRM data. - * - * @generated from field: optional bool can_update_srm = 8; - */ - canUpdateSrm?: boolean; - - /** - * @generated from field: repeated license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType supported_certificate_key_type = 9; - */ - supportedCertificateKeyType: ClientIdentification_ClientCapabilities_CertificateKeyType[]; - - /** - * @generated from field: optional license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities analog_output_capabilities = 10; - */ - analogOutputCapabilities?: ClientIdentification_ClientCapabilities_AnalogOutputCapabilities; - - /** - * @generated from field: optional bool can_disable_analog_output = 11; - */ - canDisableAnalogOutput?: boolean; - - /** - * 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 - * - * @generated from field: optional uint32 resource_rating_tier = 12; - */ - resourceRatingTier?: number; -}; - -/** - * Describes the message license_protocol.ClientIdentification.ClientCapabilities. - * Use `create(ClientIdentification_ClientCapabilitiesSchema)` to create a new message. - */ -export const ClientIdentification_ClientCapabilitiesSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 6, 1); - -/** - * @generated from enum license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion - */ -export enum ClientIdentification_ClientCapabilities_HdcpVersion { - /** - * @generated from enum value: HDCP_NONE = 0; - */ - HDCP_NONE = 0, - - /** - * @generated from enum value: HDCP_V1 = 1; - */ - HDCP_V1 = 1, - - /** - * @generated from enum value: HDCP_V2 = 2; - */ - HDCP_V2 = 2, - - /** - * @generated from enum value: HDCP_V2_1 = 3; - */ - HDCP_V2_1 = 3, - - /** - * @generated from enum value: HDCP_V2_2 = 4; - */ - HDCP_V2_2 = 4, - - /** - * @generated from enum value: HDCP_V2_3 = 5; - */ - HDCP_V2_3 = 5, - - /** - * @generated from enum value: HDCP_NO_DIGITAL_OUTPUT = 255; - */ - HDCP_NO_DIGITAL_OUTPUT = 255 -} - -/** - * Describes the enum license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion. - */ -export const ClientIdentification_ClientCapabilities_HdcpVersionSchema: GenEnum = - /*@__PURE__*/ - enumDesc(file_license_protocol, 6, 1, 0); - -/** - * @generated from enum license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType - */ -export enum ClientIdentification_ClientCapabilities_CertificateKeyType { - /** - * @generated from enum value: RSA_2048 = 0; - */ - RSA_2048 = 0, - - /** - * @generated from enum value: RSA_3072 = 1; - */ - RSA_3072 = 1, - - /** - * @generated from enum value: ECC_SECP256R1 = 2; - */ - ECC_SECP256R1 = 2, - - /** - * @generated from enum value: ECC_SECP384R1 = 3; - */ - ECC_SECP384R1 = 3, - - /** - * @generated from enum value: ECC_SECP521R1 = 4; - */ - ECC_SECP521R1 = 4 -} - -/** - * Describes the enum license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType. - */ -export const ClientIdentification_ClientCapabilities_CertificateKeyTypeSchema: GenEnum = - /*@__PURE__*/ - enumDesc(file_license_protocol, 6, 1, 1); - -/** - * @generated from enum license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities - */ -export enum ClientIdentification_ClientCapabilities_AnalogOutputCapabilities { - /** - * @generated from enum value: ANALOG_OUTPUT_UNKNOWN = 0; - */ - ANALOG_OUTPUT_UNKNOWN = 0, - - /** - * @generated from enum value: ANALOG_OUTPUT_NONE = 1; - */ - ANALOG_OUTPUT_NONE = 1, - - /** - * @generated from enum value: ANALOG_OUTPUT_SUPPORTED = 2; - */ - ANALOG_OUTPUT_SUPPORTED = 2, - - /** - * @generated from enum value: ANALOG_OUTPUT_SUPPORTS_CGMS_A = 3; - */ - ANALOG_OUTPUT_SUPPORTS_CGMS_A = 3 -} - -/** - * Describes the enum license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities. - */ -export const ClientIdentification_ClientCapabilities_AnalogOutputCapabilitiesSchema: GenEnum = - /*@__PURE__*/ - enumDesc(file_license_protocol, 6, 1, 2); - -/** - * @generated from message license_protocol.ClientIdentification.ClientCredentials - */ -export type ClientIdentification_ClientCredentials = Message<'license_protocol.ClientIdentification.ClientCredentials'> & { - /** - * @generated from field: optional license_protocol.ClientIdentification.TokenType type = 1; - */ - type?: ClientIdentification_TokenType; - - /** - * @generated from field: optional bytes token = 2; - */ - token?: Uint8Array; -}; - -/** - * Describes the message license_protocol.ClientIdentification.ClientCredentials. - * Use `create(ClientIdentification_ClientCredentialsSchema)` to create a new message. - */ -export const ClientIdentification_ClientCredentialsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 6, 2); - -/** - * @generated from enum license_protocol.ClientIdentification.TokenType - */ -export enum ClientIdentification_TokenType { - /** - * @generated from enum value: KEYBOX = 0; - */ - KEYBOX = 0, - - /** - * @generated from enum value: DRM_DEVICE_CERTIFICATE = 1; - */ - DRM_DEVICE_CERTIFICATE = 1, - - /** - * @generated from enum value: REMOTE_ATTESTATION_CERTIFICATE = 2; - */ - REMOTE_ATTESTATION_CERTIFICATE = 2, - - /** - * @generated from enum value: OEM_DEVICE_CERTIFICATE = 3; - */ - OEM_DEVICE_CERTIFICATE = 3 -} - -/** - * Describes the enum license_protocol.ClientIdentification.TokenType. - */ -export const ClientIdentification_TokenTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 6, 0); - -/** - * EncryptedClientIdentification message used to hold ClientIdentification - * messages encrypted for privacy purposes. - * - * @generated from message license_protocol.EncryptedClientIdentification - */ -export type EncryptedClientIdentification = Message<'license_protocol.EncryptedClientIdentification'> & { - /** - * Provider ID for which the ClientIdentifcation is encrypted (owner of - * service certificate). - * - * @generated from field: optional string provider_id = 1; - */ - providerId?: string; - - /** - * Serial number for the service certificate for which ClientIdentification is - * encrypted. - * - * @generated from field: optional bytes service_certificate_serial_number = 2; - */ - serviceCertificateSerialNumber?: Uint8Array; - - /** - * Serialized ClientIdentification message, encrypted with the privacy key - * using AES-128-CBC with PKCS#5 padding. - * - * @generated from field: optional bytes encrypted_client_id = 3; - */ - encryptedClientId?: Uint8Array; - - /** - * Initialization vector needed to decrypt encrypted_client_id. - * - * @generated from field: optional bytes encrypted_client_id_iv = 4; - */ - encryptedClientIdIv?: Uint8Array; - - /** - * AES-128 privacy key, encrypted with the service public key using RSA-OAEP. - * - * @generated from field: optional bytes encrypted_privacy_key = 5; - */ - encryptedPrivacyKey?: Uint8Array; -}; - -/** - * Describes the message license_protocol.EncryptedClientIdentification. - * Use `create(EncryptedClientIdentificationSchema)` to create a new message. - */ -export const EncryptedClientIdentificationSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 7); - -/** - * DRM certificate definition for user devices, intermediate, service, and root - * certificates. - * - * @generated from message license_protocol.DrmCertificate - */ -export type DrmCertificate = Message<'license_protocol.DrmCertificate'> & { - /** - * Type of certificate. Required. - * - * @generated from field: optional license_protocol.DrmCertificate.Type type = 1; - */ - type?: DrmCertificate_Type; - - /** - * 128-bit globally unique serial number of certificate. - * Value is 0 for root certificate. Required. - * - * @generated from field: optional bytes serial_number = 2; - */ - serialNumber?: Uint8Array; - - /** - * POSIX time, in seconds, when the certificate was created. Required. - * - * @generated from field: optional uint32 creation_time_seconds = 3; - */ - creationTimeSeconds?: number; - - /** - * POSIX time, in seconds, when the certificate should expire. Value of zero - * denotes indefinite expiry time. For more information on limited lifespan - * DRM certificates see (go/limited-lifespan-drm-certificates). - * - * @generated from field: optional uint32 expiration_time_seconds = 12; - */ - expirationTimeSeconds?: number; - - /** - * Device public key. PKCS#1 ASN.1 DER-encoded. Required. - * - * @generated from field: optional bytes public_key = 4; - */ - publicKey?: Uint8Array; - - /** - * Widevine system ID for the device. Required for intermediate and - * user device certificates. - * - * @generated from field: optional uint32 system_id = 5; - */ - systemId?: number; - - /** - * Deprecated field, which used to indicate whether the device was a test - * (non-production) device. The test_device field in ProvisionedDeviceInfo - * below should be observed instead. - * - * @generated from field: optional bool test_device_deprecated = 6 [deprecated = true]; - * @deprecated - */ - testDeviceDeprecated?: boolean; - - /** - * Service identifier (web origin) for the provider which owns the - * certificate. Required for service and provisioner certificates. - * - * @generated from field: optional string provider_id = 7; - */ - providerId?: string; - - /** - * This field is used only when type = SERVICE to specify which SDK uses - * service certificate. This repeated field is treated as a set. A certificate - * may be used for the specified service SDK if the appropriate ServiceType - * is specified in this field. - * - * @generated from field: repeated license_protocol.DrmCertificate.ServiceType service_types = 8; - */ - serviceTypes: DrmCertificate_ServiceType[]; - - /** - * Required. The algorithm field contains the curve used to create the - * |public_key| if algorithm is one of the ECC types. - * The |algorithm| is used for both to determine the if the certificate is ECC - * or RSA. The |algorithm| also specifies the parameters that were used to - * create |public_key| and are used to create an ephemeral session key. - * - * @generated from field: optional license_protocol.DrmCertificate.Algorithm algorithm = 9; - */ - algorithm?: DrmCertificate_Algorithm; - - /** - * Optional. May be present in DEVICE certificate types. This is the root - * of trust identifier that holds an encrypted value that identifies the - * keybox or other root of trust that was used to provision a DEVICE drm - * certificate. - * - * @generated from field: optional bytes rot_id = 10; - */ - rotId?: Uint8Array; - - /** - * Optional. May be present in devices that explicitly support dual keys. When - * present the |public_key| is used for verification of received license - * request messages. - * - * @generated from field: optional license_protocol.DrmCertificate.EncryptionKey encryption_key = 11; - */ - encryptionKey?: DrmCertificate_EncryptionKey; -}; - -/** - * Describes the message license_protocol.DrmCertificate. - * Use `create(DrmCertificateSchema)` to create a new message. - */ -export const DrmCertificateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 8); - -/** - * @generated from message license_protocol.DrmCertificate.EncryptionKey - */ -export type DrmCertificate_EncryptionKey = Message<'license_protocol.DrmCertificate.EncryptionKey'> & { - /** - * Device public key. PKCS#1 ASN.1 DER-encoded. Required. - * - * @generated from field: optional bytes public_key = 1; - */ - publicKey?: Uint8Array; - - /** - * Required. The algorithm field contains the curve used to create the - * |public_key| if algorithm is one of the ECC types. - * The |algorithm| is used for both to determine the if the certificate is - * ECC or RSA. The |algorithm| also specifies the parameters that were used - * to create |public_key| and are used to create an ephemeral session key. - * - * @generated from field: optional license_protocol.DrmCertificate.Algorithm algorithm = 2; - */ - algorithm?: DrmCertificate_Algorithm; -}; - -/** - * Describes the message license_protocol.DrmCertificate.EncryptionKey. - * Use `create(DrmCertificate_EncryptionKeySchema)` to create a new message. - */ -export const DrmCertificate_EncryptionKeySchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 8, 0); - -/** - * @generated from enum license_protocol.DrmCertificate.Type - */ -export enum DrmCertificate_Type { - /** - * ProtoBestPractices: ignore. - * - * @generated from enum value: ROOT = 0; - */ - ROOT = 0, - - /** - * @generated from enum value: DEVICE_MODEL = 1; - */ - DEVICE_MODEL = 1, - - /** - * @generated from enum value: DEVICE = 2; - */ - DEVICE = 2, - - /** - * @generated from enum value: SERVICE = 3; - */ - SERVICE = 3, - - /** - * @generated from enum value: PROVISIONER = 4; - */ - PROVISIONER = 4 -} - -/** - * Describes the enum license_protocol.DrmCertificate.Type. - */ -export const DrmCertificate_TypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 8, 0); - -/** - * @generated from enum license_protocol.DrmCertificate.ServiceType - */ -export enum DrmCertificate_ServiceType { - /** - * @generated from enum value: UNKNOWN_SERVICE_TYPE = 0; - */ - UNKNOWN_SERVICE_TYPE = 0, - - /** - * @generated from enum value: LICENSE_SERVER_SDK = 1; - */ - LICENSE_SERVER_SDK = 1, - - /** - * @generated from enum value: LICENSE_SERVER_PROXY_SDK = 2; - */ - LICENSE_SERVER_PROXY_SDK = 2, - - /** - * @generated from enum value: PROVISIONING_SDK = 3; - */ - PROVISIONING_SDK = 3, - - /** - * @generated from enum value: CAS_PROXY_SDK = 4; - */ - CAS_PROXY_SDK = 4 -} - -/** - * Describes the enum license_protocol.DrmCertificate.ServiceType. - */ -export const DrmCertificate_ServiceTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 8, 1); - -/** - * @generated from enum license_protocol.DrmCertificate.Algorithm - */ -export enum DrmCertificate_Algorithm { - /** - * @generated from enum value: UNKNOWN_ALGORITHM = 0; - */ - UNKNOWN_ALGORITHM = 0, - - /** - * @generated from enum value: RSA = 1; - */ - RSA = 1, - - /** - * @generated from enum value: ECC_SECP256R1 = 2; - */ - ECC_SECP256R1 = 2, - - /** - * @generated from enum value: ECC_SECP384R1 = 3; - */ - ECC_SECP384R1 = 3, - - /** - * @generated from enum value: ECC_SECP521R1 = 4; - */ - ECC_SECP521R1 = 4 -} - -/** - * Describes the enum license_protocol.DrmCertificate.Algorithm. - */ -export const DrmCertificate_AlgorithmSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 8, 2); - -/** - * DrmCertificate signed by a higher (CA) DRM certificate. - * - * @generated from message license_protocol.SignedDrmCertificate - */ -export type SignedDrmCertificate = Message<'license_protocol.SignedDrmCertificate'> & { - /** - * Serialized certificate. Required. - * - * @generated from field: optional bytes drm_certificate = 1; - */ - drmCertificate?: Uint8Array; - - /** - * Signature of certificate. Signed with root or intermediate - * certificate specified below. Required. - * - * @generated from field: optional bytes signature = 2; - */ - signature?: Uint8Array; - - /** - * SignedDrmCertificate used to sign this certificate. - * - * @generated from field: optional license_protocol.SignedDrmCertificate signer = 3; - */ - signer?: SignedDrmCertificate; - - /** - * Optional field that indicates the hash algorithm used in signature scheme. - * - * @generated from field: optional license_protocol.HashAlgorithmProto hash_algorithm = 4; - */ - hashAlgorithm?: HashAlgorithmProto; -}; - -/** - * Describes the message license_protocol.SignedDrmCertificate. - * Use `create(SignedDrmCertificateSchema)` to create a new message. - */ -export const SignedDrmCertificateSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 9); - -/** - * @generated from message license_protocol.WidevinePsshData - */ -export type WidevinePsshData = Message<'license_protocol.WidevinePsshData'> & { - /** - * Entitlement or content key IDs. Can onnly present in SINGLE or ENTITLEMENT - * PSSHs. May be repeated to facilitate delivery of multiple keys in a - * single license. Cannot be used in conjunction with content_id or - * group_ids, which are the preferred mechanism. - * - * @generated from field: repeated bytes key_ids = 2; - */ - keyIds: Uint8Array[]; - - /** - * Content identifier which may map to multiple entitlement or content key - * IDs to facilitate the delivery of multiple keys in a single license. - * Cannot be present in conjunction with key_ids, but if used must be in all - * PSSHs. - * - * @generated from field: optional bytes content_id = 4; - */ - contentId?: Uint8Array; - - /** - * Crypto period index, for media using key rotation. Always corresponds to - * The content key period. This means that if using entitlement licensing - * the ENTITLED_KEY PSSHs will have sequential crypto_period_index's, whereas - * the ENTITELEMENT PSSHs will have gaps in the sequence. Required if doing - * key rotation. - * - * @generated from field: optional uint32 crypto_period_index = 7; - */ - cryptoPeriodIndex?: number; - - /** - * Protection scheme identifying the encryption algorithm. The protection - * scheme is represented as a uint32 value. The uint32 contains 4 bytes each - * representing a single ascii character in one of the 4CC protection scheme - * values. To be deprecated in favor of signaling from content. - * 'cenc' (AES-CTR) protection_scheme = 0x63656E63, - * 'cbc1' (AES-CBC) protection_scheme = 0x63626331, - * 'cens' (AES-CTR pattern encryption) protection_scheme = 0x63656E73, - * 'cbcs' (AES-CBC pattern encryption) protection_scheme = 0x63626373. - * - * @generated from field: optional uint32 protection_scheme = 9; - */ - protectionScheme?: number; - - /** - * Optional. For media using key rotation, this represents the duration - * of each crypto period in seconds. - * - * @generated from field: optional uint32 crypto_period_seconds = 10; - */ - cryptoPeriodSeconds?: number; - - /** - * Type of PSSH. Required if not SINGLE. - * - * @generated from field: optional license_protocol.WidevinePsshData.Type type = 11; - */ - type?: WidevinePsshData_Type; - - /** - * Key sequence for Widevine-managed keys. Optional. - * - * @generated from field: optional uint32 key_sequence = 12; - */ - keySequence?: number; - - /** - * Group identifiers for all groups to which the content belongs. This can - * be used to deliver licenses to unlock multiple titles / channels. - * Optional, and may only be present in ENTITLEMENT and ENTITLED_KEY PSSHs, and - * not in conjunction with key_ids. - * - * @generated from field: repeated bytes group_ids = 13; - */ - groupIds: Uint8Array[]; - - /** - * Copy/copies of the content key used to decrypt the media stream in which - * the PSSH box is embedded, each wrapped with a different entitlement key. - * May also contain sub-licenses to support devices with OEMCrypto 13 or - * older. May be repeated if using group entitlement keys. Present only in - * PSSHs of type ENTITLED_KEY. - * - * @generated from field: repeated license_protocol.WidevinePsshData.EntitledKey entitled_keys = 14; - */ - entitledKeys: WidevinePsshData_EntitledKey[]; - - /** - * Video feature identifier, which is used in conjunction with |content_id| - * to determine the set of keys to be returned in the license. Cannot be - * present in conjunction with |key_ids|. - * Current values are "HDR". - * - * @generated from field: optional string video_feature = 15; - */ - videoFeature?: string; - - /** - * @generated from field: optional license_protocol.WidevinePsshData.Algorithm algorithm = 1 [deprecated = true]; - * @deprecated - */ - algorithm?: WidevinePsshData_Algorithm; - - /** - * Content provider name. - * - * @generated from field: optional string provider = 3 [deprecated = true]; - * @deprecated - */ - provider?: string; - - /** - * Track type. Acceptable values are SD, HD and AUDIO. Used to - * differentiate content keys used by an asset. - * - * @generated from field: optional string track_type = 5 [deprecated = true]; - * @deprecated - */ - trackType?: string; - - /** - * The name of a registered policy to be used for this asset. - * - * @generated from field: optional string policy = 6 [deprecated = true]; - * @deprecated - */ - policy?: string; - - /** - * Optional protected context for group content. The grouped_license is a - * serialized SignedMessage. - * - * @generated from field: optional bytes grouped_license = 8 [deprecated = true]; - * @deprecated - */ - groupedLicense?: Uint8Array; -}; - -/** - * Describes the message license_protocol.WidevinePsshData. - * Use `create(WidevinePsshDataSchema)` to create a new message. - */ -export const WidevinePsshDataSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 10); - -/** - * @generated from message license_protocol.WidevinePsshData.EntitledKey - */ -export type WidevinePsshData_EntitledKey = Message<'license_protocol.WidevinePsshData.EntitledKey'> & { - /** - * ID of entitlement key used for wrapping |key|. - * - * @generated from field: optional bytes entitlement_key_id = 1; - */ - entitlementKeyId?: Uint8Array; - - /** - * ID of the entitled key. - * - * @generated from field: optional bytes key_id = 2; - */ - keyId?: Uint8Array; - - /** - * Wrapped key. Required. - * - * @generated from field: optional bytes key = 3; - */ - key?: Uint8Array; - - /** - * IV used for wrapping |key|. Required. - * - * @generated from field: optional bytes iv = 4; - */ - iv?: Uint8Array; - - /** - * Size of entitlement key used for wrapping |key|. - * - * @generated from field: optional uint32 entitlement_key_size_bytes = 5; - */ - entitlementKeySizeBytes?: number; -}; - -/** - * Describes the message license_protocol.WidevinePsshData.EntitledKey. - * Use `create(WidevinePsshData_EntitledKeySchema)` to create a new message. - */ -export const WidevinePsshData_EntitledKeySchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 10, 0); - -/** - * @generated from enum license_protocol.WidevinePsshData.Type - */ -export enum WidevinePsshData_Type { - /** - * Single PSSH to be used to retrieve content keys. - * - * @generated from enum value: SINGLE = 0; - */ - SINGLE = 0, - - /** - * Primary PSSH used to retrieve entitlement keys. - * - * @generated from enum value: ENTITLEMENT = 1; - */ - ENTITLEMENT = 1, - - /** - * Secondary PSSH containing entitled key(s). - * - * @generated from enum value: ENTITLED_KEY = 2; - */ - ENTITLED_KEY = 2 -} - -/** - * Describes the enum license_protocol.WidevinePsshData.Type. - */ -export const WidevinePsshData_TypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 10, 0); - -/** - * ////////////////////////// Deprecated Fields //////////////////////////// - * - * @generated from enum license_protocol.WidevinePsshData.Algorithm - */ -export enum WidevinePsshData_Algorithm { - /** - * @generated from enum value: UNENCRYPTED = 0; - */ - UNENCRYPTED = 0, - - /** - * @generated from enum value: AESCTR = 1; - */ - AESCTR = 1 -} - -/** - * Describes the enum license_protocol.WidevinePsshData.Algorithm. - */ -export const WidevinePsshData_AlgorithmSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 10, 1); - -/** - * File Hashes for Verified Media Path (VMP) support. - * - * @generated from message license_protocol.FileHashes - */ -export type FileHashes = Message<'license_protocol.FileHashes'> & { - /** - * @generated from field: optional bytes signer = 1; - */ - signer?: Uint8Array; - - /** - * @generated from field: repeated license_protocol.FileHashes.Signature signatures = 2; - */ - signatures: FileHashes_Signature[]; -}; - -/** - * Describes the message license_protocol.FileHashes. - * Use `create(FileHashesSchema)` to create a new message. - */ -export const FileHashesSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 11); - -/** - * @generated from message license_protocol.FileHashes.Signature - */ -export type FileHashes_Signature = Message<'license_protocol.FileHashes.Signature'> & { - /** - * @generated from field: optional string filename = 1; - */ - filename?: string; - - /** - * 0 - release, 1 - testing - * - * @generated from field: optional bool test_signing = 2; - */ - testSigning?: boolean; - - /** - * @generated from field: optional bytes SHA512Hash = 3; - */ - SHA512Hash?: Uint8Array; - - /** - * 0 for dlls, 1 for exe, this is field 3 in file - * - * @generated from field: optional bool main_exe = 4; - */ - mainExe?: boolean; - - /** - * @generated from field: optional bytes signature = 5; - */ - signature?: Uint8Array; -}; - -/** - * Describes the message license_protocol.FileHashes.Signature. - * Use `create(FileHashes_SignatureSchema)` to create a new message. - */ -export const FileHashes_SignatureSchema: GenMessage = /*@__PURE__*/ messageDesc(file_license_protocol, 11, 0); - -/** - * @generated from enum license_protocol.LicenseType - */ -export enum LicenseType { - /** - * @generated from enum value: LICENSETYPE_UNVERIFIED = 0; - */ - LICENSETYPE_UNVERIFIED = 0, - - /** - * @generated from enum value: STREAMING = 1; - */ - STREAMING = 1, - - /** - * @generated from enum value: OFFLINE = 2; - */ - OFFLINE = 2, - - /** - * License type decision is left to provider. - * - * @generated from enum value: AUTOMATIC = 3; - */ - AUTOMATIC = 3 -} - -/** - * Describes the enum license_protocol.LicenseType. - */ -export const LicenseTypeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 0); - -/** - * @generated from enum license_protocol.PlatformVerificationStatus - */ -export enum PlatformVerificationStatus { - /** - * The platform is not verified. - * - * @generated from enum value: PLATFORM_UNVERIFIED = 0; - */ - PLATFORM_UNVERIFIED = 0, - - /** - * Tampering detected on the platform. - * - * @generated from enum value: PLATFORM_TAMPERED = 1; - */ - PLATFORM_TAMPERED = 1, - - /** - * The platform has been verified by means of software. - * - * @generated from enum value: PLATFORM_SOFTWARE_VERIFIED = 2; - */ - PLATFORM_SOFTWARE_VERIFIED = 2, - - /** - * The platform has been verified by means of hardware (e.g. secure boot). - * - * @generated from enum value: PLATFORM_HARDWARE_VERIFIED = 3; - */ - PLATFORM_HARDWARE_VERIFIED = 3, - - /** - * Platform verification was not performed. - * - * @generated from enum value: PLATFORM_NO_VERIFICATION = 4; - */ - PLATFORM_NO_VERIFICATION = 4, - - /** - * Platform and secure storage capability have been verified by means of - * software. - * - * @generated from enum value: PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED = 5; - */ - PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED = 5 -} - -/** - * Describes the enum license_protocol.PlatformVerificationStatus. - */ -export const PlatformVerificationStatusSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 1); - -/** - * @generated from enum license_protocol.ProtocolVersion - */ -export enum ProtocolVersion { - /** - * @generated from enum value: VERSION_UNVERIFIED = 0; - */ - VERSION_UNVERIFIED = 0, - - /** - * @generated from enum value: VERSION_2_0 = 20; - */ - VERSION_2_0 = 20, - - /** - * @generated from enum value: VERSION_2_1 = 21; - */ - VERSION_2_1 = 21, - - /** - * @generated from enum value: VERSION_2_2 = 22; - */ - VERSION_2_2 = 22 -} - -/** - * Describes the enum license_protocol.ProtocolVersion. - */ -export const ProtocolVersionSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 2); - -/** - * @generated from enum license_protocol.HashAlgorithmProto - */ -export enum HashAlgorithmProto { - /** - * Unspecified hash algorithm: SHA_256 shall be used for ECC based algorithms - * and SHA_1 shall be used otherwise. - * - * @generated from enum value: HASH_ALGORITHM_UNSPECIFIED = 0; - */ - HASH_ALGORITHM_UNSPECIFIED = 0, - - /** - * @generated from enum value: HASH_ALGORITHM_SHA_1 = 1; - */ - HASH_ALGORITHM_SHA_1 = 1, - - /** - * @generated from enum value: HASH_ALGORITHM_SHA_256 = 2; - */ - HASH_ALGORITHM_SHA_256 = 2, - - /** - * @generated from enum value: HASH_ALGORITHM_SHA_384 = 3; - */ - HASH_ALGORITHM_SHA_384 = 3 -} - -/** - * Describes the enum license_protocol.HashAlgorithmProto. - */ -export const HashAlgorithmProtoSchema: GenEnum = /*@__PURE__*/ enumDesc(file_license_protocol, 3); diff --git a/package.json b/package.json index 8e24b64..1e1a3bf 100644 --- a/package.json +++ b/package.json @@ -52,30 +52,27 @@ "lookpath": "^1.2.3", "m3u8-parsed": "^2.0.0", "mpd-parser": "^1.3.1", - "node-forge": "^1.3.1", - "node-playready": "^1.1.0", + "node-playready": "^1.1.1", "open": "^11.0.0", "protobufjs": "^7.5.4", "puppeteer-real-browser": "^1.4.4", "undici": "^7.16.0", + "widevine": "^1.0.1", "ws": "^8.18.3", "yaml": "^2.8.1" }, "devDependencies": { - "@bufbuild/buf": "^1.60.0", - "@bufbuild/protoc-gen-es": "^2.10.1", "@eslint/js": "^9.39.1", "@types/cors": "^2.8.19", "@types/express": "^5.0.5", "@types/ffprobe": "^1.1.8", "@types/fs-extra": "^11.0.4", "@types/node": "^24.10.1", - "@types/node-forge": "^1.3.14", "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.47.0", "@typescript-eslint/parser": "^8.47.0", "@yao-pkg/pkg": "^6.10.1", - "esbuild": "^0.27.0", + "esbuild": "0.26.0", "eslint": "^9.39.1", "eslint-config-prettier": "^10.1.8", "prettier": "^3.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fda074a..ad12d9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,12 +44,9 @@ importers: mpd-parser: specifier: ^1.3.1 version: 1.3.1 - node-forge: - specifier: ^1.3.1 - version: 1.3.1 node-playready: - specifier: ^1.1.0 - version: 1.1.0 + specifier: ^1.1.1 + version: 1.1.1 open: specifier: ^11.0.0 version: 11.0.0 @@ -62,6 +59,9 @@ importers: undici: specifier: ^7.16.0 version: 7.16.0 + widevine: + specifier: ^1.0.1 + version: 1.0.1 ws: specifier: ^8.18.3 version: 8.18.3 @@ -69,12 +69,6 @@ importers: specifier: ^2.8.1 version: 2.8.1 devDependencies: - '@bufbuild/buf': - specifier: ^1.60.0 - version: 1.60.0 - '@bufbuild/protoc-gen-es': - specifier: ^2.10.1 - version: 2.10.1(@bufbuild/protobuf@2.10.1) '@eslint/js': specifier: ^9.39.1 version: 9.39.1 @@ -93,9 +87,6 @@ importers: '@types/node': specifier: ^24.10.1 version: 24.10.1 - '@types/node-forge': - specifier: ^1.3.14 - version: 1.3.14 '@types/ws': specifier: ^8.18.1 version: 8.18.1 @@ -109,8 +100,8 @@ importers: specifier: ^6.10.1 version: 6.10.1 esbuild: - specifier: ^0.27.0 - version: 0.27.0 + specifier: 0.26.0 + version: 0.26.0 eslint: specifier: ^9.39.1 version: 9.39.1 @@ -160,225 +151,165 @@ packages: resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} engines: {node: '>=6.9.0'} - '@bufbuild/buf-darwin-arm64@1.60.0': - resolution: {integrity: sha512-3C/+EVyHnTGEl0DQ2GISab86IyE0jI4A65m059/BT0LFOF4vPbJU7bHO3Zzz+sFDWer+Ddi+93Tph+pWoxGI9A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - - '@bufbuild/buf-darwin-x64@1.60.0': - resolution: {integrity: sha512-hS6BLLJGJj1FfA0m/pGI/ihv2i4/kin7pQlY1x1rE/FOwzpDFveLVKht+o6dt38cz2HSjLcItOrnke7D4hLBsg==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - - '@bufbuild/buf-linux-aarch64@1.60.0': - resolution: {integrity: sha512-arpgQZ3YZ6RQ6xwCAfKaBHS7wlQBxBDeWSEb+KXOkCGu6fcJX+4b80vUWIVJPE+j2tfpIv02ncWLCwU1tyWeuA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - - '@bufbuild/buf-linux-armv7@1.60.0': - resolution: {integrity: sha512-4vDsFgo1m5+J/kY8L58tbnPlpbt6FUO5ngKSIporCTZ+VfpiMiK8R6kh0Tp7PDOO3nAyTqzY/V6h+APnewsuOQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - - '@bufbuild/buf-linux-x64@1.60.0': - resolution: {integrity: sha512-E3p1o1VLUxiPnTvOUXU5A37CeF3zbvNZYZQzZT2KZvMCbjch1ZG2zFBmgRtuGsid2aQ260O5NXurh+abDg3boA==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - - '@bufbuild/buf-win32-arm64@1.60.0': - resolution: {integrity: sha512-c3udQuwdCOZk5ijeQKT64rbXvzRvJzXqOLjOn+2loM/Yhx6csoOKzCRPxlGKP8qLy45woSoH/tfiBPzuvFKeLA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - - '@bufbuild/buf-win32-x64@1.60.0': - resolution: {integrity: sha512-xu/o0wJHK+KL/kvfbV/3UvcelJ+DAwxMwhjrGG0mCq91MY+wKXaQHwv28MDjHtSC71+aV81A/YgJDcQjpQtZkg==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - - '@bufbuild/buf@1.60.0': - resolution: {integrity: sha512-RF7EcwHF9wGUs4EBSweHtXZHfVL7bqkSPD1zwgJmG/ejo/I7KXS8+mT56fjw4r6MNgyNTV9F9gVfTsx4D6vhhA==} - engines: {node: '>=12'} - hasBin: true - '@bufbuild/protobuf@2.10.1': resolution: {integrity: sha512-ckS3+vyJb5qGpEYv/s1OebUHDi/xSNtfgw1wqKZo7MR9F2z+qXr0q5XagafAG/9O0QPVIUfST0smluYSTpYFkg==} - '@bufbuild/protoc-gen-es@2.10.1': - resolution: {integrity: sha512-vsfbWs1X93oX+sMMJ7910/OwIizAYH5IOAArsxnSTifiop1fVgLFPAvJBLiHZoNMI8B/lbqji2SFwvjK0AWO1Q==} - engines: {node: '>=20'} - hasBin: true - peerDependencies: - '@bufbuild/protobuf': 2.10.1 - peerDependenciesMeta: - '@bufbuild/protobuf': - optional: true - - '@bufbuild/protoplugin@2.10.1': - resolution: {integrity: sha512-imB8dKEjrOnG5+XqVS+CeYn924WGLU/g3wogKhk11XtX9y9NJ7432OS6h24asuBbLrQcPdEZ6QkfM7KeOCeeyQ==} - '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} - '@esbuild/aix-ppc64@0.27.0': - resolution: {integrity: sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==} + '@esbuild/aix-ppc64@0.26.0': + resolution: {integrity: sha512-hj0sKNCQOOo2fgyII3clmJXP28VhgDfU5iy3GNHlWO76KG6N7x4D9ezH5lJtQTG+1J6MFDAJXC1qsI+W+LvZoA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.0': - resolution: {integrity: sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==} + '@esbuild/android-arm64@0.26.0': + resolution: {integrity: sha512-DDnoJ5eoa13L8zPh87PUlRd/IyFaIKOlRbxiwcSbeumcJ7UZKdtuMCHa1Q27LWQggug6W4m28i4/O2qiQQ5NZQ==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.0': - resolution: {integrity: sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==} + '@esbuild/android-arm@0.26.0': + resolution: {integrity: sha512-C0hkDsYNHZkBtPxxDx177JN90/1MiCpvBNjz1f5yWJo1+5+c5zr8apjastpEG+wtPjo9FFtGG7owSsAxyKiHxA==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.0': - resolution: {integrity: sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==} + '@esbuild/android-x64@0.26.0': + resolution: {integrity: sha512-bKDkGXGZnj0T70cRpgmv549x38Vr2O3UWLbjT2qmIkdIWcmlg8yebcFWoT9Dku7b5OV3UqPEuNKRzlNhjwUJ9A==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.0': - resolution: {integrity: sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==} + '@esbuild/darwin-arm64@0.26.0': + resolution: {integrity: sha512-6Z3naJgOuAIB0RLlJkYc81An3rTlQ/IeRdrU3dOea8h/PvZSgitZV+thNuIccw0MuK1GmIAnAmd5TrMZad8FTQ==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.0': - resolution: {integrity: sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==} + '@esbuild/darwin-x64@0.26.0': + resolution: {integrity: sha512-OPnYj0zpYW0tHusMefyaMvNYQX5pNQuSsHFTHUBNp3vVXupwqpxofcjVsUx11CQhGVkGeXjC3WLjh91hgBG2xw==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.0': - resolution: {integrity: sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==} + '@esbuild/freebsd-arm64@0.26.0': + resolution: {integrity: sha512-jix2fa6GQeZhO1sCKNaNMjfj5hbOvoL2F5t+w6gEPxALumkpOV/wq7oUBMHBn2hY2dOm+mEV/K+xfZy3mrsxNQ==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.0': - resolution: {integrity: sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==} + '@esbuild/freebsd-x64@0.26.0': + resolution: {integrity: sha512-tccJaH5xHJD/239LjbVvJwf6T4kSzbk6wPFerF0uwWlkw/u7HL+wnAzAH5GB2irGhYemDgiNTp8wJzhAHQ64oA==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.0': - resolution: {integrity: sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==} + '@esbuild/linux-arm64@0.26.0': + resolution: {integrity: sha512-IMJYN7FSkLttYyTbsbme0Ra14cBO5z47kpamo16IwggzzATFY2lcZAwkbcNkWiAduKrTgFJP7fW5cBI7FzcuNQ==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.0': - resolution: {integrity: sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==} + '@esbuild/linux-arm@0.26.0': + resolution: {integrity: sha512-JY8NyU31SyRmRpuc5W8PQarAx4TvuYbyxbPIpHAZdr/0g4iBr8KwQBS4kiiamGl2f42BBecHusYCsyxi7Kn8UQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.0': - resolution: {integrity: sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==} + '@esbuild/linux-ia32@0.26.0': + resolution: {integrity: sha512-XITaGqGVLgk8WOHw8We9Z1L0lbLFip8LyQzKYFKO4zFo1PFaaSKsbNjvkb7O8kEXytmSGRkYpE8LLVpPJpsSlw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.0': - resolution: {integrity: sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==} + '@esbuild/linux-loong64@0.26.0': + resolution: {integrity: sha512-MkggfbDIczStUJwq9wU7gQ7kO33d8j9lWuOCDifN9t47+PeI+9m2QVh51EI/zZQ1spZtFMC1nzBJ+qNGCjJnsg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.0': - resolution: {integrity: sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==} + '@esbuild/linux-mips64el@0.26.0': + resolution: {integrity: sha512-fUYup12HZWAeccNLhQ5HwNBPr4zXCPgUWzEq2Rfw7UwqwfQrFZ0SR/JljaURR8xIh9t+o1lNUFTECUTmaP7yKA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.0': - resolution: {integrity: sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==} + '@esbuild/linux-ppc64@0.26.0': + resolution: {integrity: sha512-MzRKhM0Ip+//VYwC8tialCiwUQ4G65WfALtJEFyU0GKJzfTYoPBw5XNWf0SLbCUYQbxTKamlVwPmcw4DgZzFxg==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.0': - resolution: {integrity: sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==} + '@esbuild/linux-riscv64@0.26.0': + resolution: {integrity: sha512-QhCc32CwI1I4Jrg1enCv292sm3YJprW8WHHlyxJhae/dVs+KRWkbvz2Nynl5HmZDW/m9ZxrXayHzjzVNvQMGQA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.0': - resolution: {integrity: sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==} + '@esbuild/linux-s390x@0.26.0': + resolution: {integrity: sha512-1D6vi6lfI18aNT1aTf2HV+RIlm6fxtlAp8eOJ4mmnbYmZ4boz8zYDar86sIYNh0wmiLJEbW/EocaKAX6Yso2fw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.0': - resolution: {integrity: sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==} + '@esbuild/linux-x64@0.26.0': + resolution: {integrity: sha512-rnDcepj7LjrKFvZkx+WrBv6wECeYACcFjdNPvVPojCPJD8nHpb3pv3AuR9CXgdnjH1O23btICj0rsp0L9wAnHA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.0': - resolution: {integrity: sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==} + '@esbuild/netbsd-arm64@0.26.0': + resolution: {integrity: sha512-FSWmgGp0mDNjEXXFcsf12BmVrb+sZBBBlyh3LwB/B9ac3Kkc8x5D2WimYW9N7SUkolui8JzVnVlWh7ZmjCpnxw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.0': - resolution: {integrity: sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==} + '@esbuild/netbsd-x64@0.26.0': + resolution: {integrity: sha512-0QfciUDFryD39QoSPUDshj4uNEjQhp73+3pbSAaxjV2qGOEDsM67P7KbJq7LzHoVl46oqhIhJ1S+skKGR7lMXA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.0': - resolution: {integrity: sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==} + '@esbuild/openbsd-arm64@0.26.0': + resolution: {integrity: sha512-vmAK+nHhIZWImwJ3RNw9hX3fU4UGN/OqbSE0imqljNbUQC3GvVJ1jpwYoTfD6mmXmQaxdJY6Hn4jQbLGJKg5Yw==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.0': - resolution: {integrity: sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==} + '@esbuild/openbsd-x64@0.26.0': + resolution: {integrity: sha512-GPXF7RMkJ7o9bTyUsnyNtrFMqgM3X+uM/LWw4CeHIjqc32fm0Ir6jKDnWHpj8xHFstgWDUYseSABK9KCkHGnpg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.0': - resolution: {integrity: sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==} + '@esbuild/openharmony-arm64@0.26.0': + resolution: {integrity: sha512-nUHZ5jEYqbBthbiBksbmHTlbb5eElyVfs/s1iHQ8rLBq1eWsd5maOnDpCocw1OM8kFK747d1Xms8dXJHtduxSw==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.0': - resolution: {integrity: sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==} + '@esbuild/sunos-x64@0.26.0': + resolution: {integrity: sha512-TMg3KCTCYYaVO+R6P5mSORhcNDDlemUVnUbb8QkboUtOhb5JWKAzd5uMIMECJQOxHZ/R+N8HHtDF5ylzLfMiLw==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.0': - resolution: {integrity: sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==} + '@esbuild/win32-arm64@0.26.0': + resolution: {integrity: sha512-apqYgoAUd6ZCb9Phcs8zN32q6l0ZQzQBdVXOofa6WvHDlSOhwCWgSfVQabGViThS40Y1NA4SCvQickgZMFZRlA==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.0': - resolution: {integrity: sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==} + '@esbuild/win32-ia32@0.26.0': + resolution: {integrity: sha512-FGJAcImbJNZzLWu7U6WB0iKHl4RuY4TsXEwxJPl9UZLS47agIZuILZEX3Pagfw7I4J3ddflomt9f0apfaJSbaw==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.0': - resolution: {integrity: sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==} + '@esbuild/win32-x64@0.26.0': + resolution: {integrity: sha512-WAckBKaVnmFqbEhbymrPK7M086DQMpL1XoRbpmN0iW8k5JSXjDRQBhcZNa0VweItknLq9eAeCL34jK7/CDcw7A==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -572,9 +503,6 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node-forge@1.3.14': - resolution: {integrity: sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==} - '@types/node@24.10.1': resolution: {integrity: sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==} @@ -658,11 +586,6 @@ packages: resolution: {integrity: sha512-SIV3/6eftCy1bNzCQoPmbWsRLujS8t5iDIZ4spZOBHqrM+yfX2ogg8Tt3PDTAVKw3sSCiUgg30uOAvK2r9zGjQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript/vfs@1.6.2': - resolution: {integrity: sha512-hoBwJwcbKHmvd2QVebiytN1aELvpk9B74B4L1mFm/XT1Q/VOYAWl2vQ9AWRFtQq8zmz6enTpfTV8WRc4ATjW/g==} - peerDependencies: - typescript: '*' - '@videojs/vhs-utils@4.0.0': resolution: {integrity: sha512-xJp7Yd4jMLwje2vHCUmi8MOUU76nxiwII3z4Eg3Ucb+6rrkFVGosrXlMgGnaLjq724j3wzNElRZ71D/CKrTtxg==} engines: {node: '>=8', npm: '>=5'} @@ -706,10 +629,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - aes-cmac@4.0.0: - resolution: {integrity: sha512-HhYx38lyXTYYVR7WdgN9LRdls63t3RXAUDUUpKrEVgyOTiqVanc1FBxh7Mncuu7Q1VyNU+HRSZHdAYefBL7Hcg==} - engines: {node: '>=20.19.2'} - agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -1017,8 +936,8 @@ packages: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} - esbuild@0.27.0: - resolution: {integrity: sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==} + esbuild@0.26.0: + resolution: {integrity: sha512-3Hq7jri+tRrVWha+ZeIVhl4qJRha/XjRNSopvTsOaCvfPHrflTYTcUFcEjMKdxofsXXsdc4zjg5NOTnL4Gl57Q==} engines: {node: '>=18'} hasBin: true @@ -1566,8 +1485,8 @@ packages: node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - node-playready@1.1.0: - resolution: {integrity: sha512-AZ7HIqI8aHtqj2MrjgCKKoo90fFXh7hfAeodjnN5CikO81ik9JF/qEbb4T+FTIVgxOr4iK/DplybSmbaUcH7GA==} + node-playready@1.1.1: + resolution: {integrity: sha512-lGoS0T4cVnRZA5mQbHOn31EXqRwijb0pXdxISCL8cjFhE6DjWjEtlcCL/XgpUFwODajVUg5GI0zFVJZOH4nRtg==} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -1991,11 +1910,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} - engines: {node: '>=14.17'} - hasBin: true - typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -2056,6 +1970,9 @@ packages: engines: {node: '>= 8'} hasBin: true + widevine@1.0.1: + resolution: {integrity: sha512-xbFxyuyrq/BYBeTI42PsotGEgT/pNcJDD6EU8Y9vldvm28Ql7RnpDSiZO01EuZHihBsfYPmOFLk13iPelvqD2w==} + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} @@ -2154,135 +2071,88 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 - '@bufbuild/buf-darwin-arm64@1.60.0': - optional: true - - '@bufbuild/buf-darwin-x64@1.60.0': - optional: true - - '@bufbuild/buf-linux-aarch64@1.60.0': - optional: true - - '@bufbuild/buf-linux-armv7@1.60.0': - optional: true - - '@bufbuild/buf-linux-x64@1.60.0': - optional: true - - '@bufbuild/buf-win32-arm64@1.60.0': - optional: true - - '@bufbuild/buf-win32-x64@1.60.0': - optional: true - - '@bufbuild/buf@1.60.0': - optionalDependencies: - '@bufbuild/buf-darwin-arm64': 1.60.0 - '@bufbuild/buf-darwin-x64': 1.60.0 - '@bufbuild/buf-linux-aarch64': 1.60.0 - '@bufbuild/buf-linux-armv7': 1.60.0 - '@bufbuild/buf-linux-x64': 1.60.0 - '@bufbuild/buf-win32-arm64': 1.60.0 - '@bufbuild/buf-win32-x64': 1.60.0 - '@bufbuild/protobuf@2.10.1': {} - '@bufbuild/protoc-gen-es@2.10.1(@bufbuild/protobuf@2.10.1)': - dependencies: - '@bufbuild/protoplugin': 2.10.1 - optionalDependencies: - '@bufbuild/protobuf': 2.10.1 - transitivePeerDependencies: - - supports-color - - '@bufbuild/protoplugin@2.10.1': - dependencies: - '@bufbuild/protobuf': 2.10.1 - '@typescript/vfs': 1.6.2(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@esbuild/aix-ppc64@0.27.0': + '@esbuild/aix-ppc64@0.26.0': optional: true - '@esbuild/android-arm64@0.27.0': + '@esbuild/android-arm64@0.26.0': optional: true - '@esbuild/android-arm@0.27.0': + '@esbuild/android-arm@0.26.0': optional: true - '@esbuild/android-x64@0.27.0': + '@esbuild/android-x64@0.26.0': optional: true - '@esbuild/darwin-arm64@0.27.0': + '@esbuild/darwin-arm64@0.26.0': optional: true - '@esbuild/darwin-x64@0.27.0': + '@esbuild/darwin-x64@0.26.0': optional: true - '@esbuild/freebsd-arm64@0.27.0': + '@esbuild/freebsd-arm64@0.26.0': optional: true - '@esbuild/freebsd-x64@0.27.0': + '@esbuild/freebsd-x64@0.26.0': optional: true - '@esbuild/linux-arm64@0.27.0': + '@esbuild/linux-arm64@0.26.0': optional: true - '@esbuild/linux-arm@0.27.0': + '@esbuild/linux-arm@0.26.0': optional: true - '@esbuild/linux-ia32@0.27.0': + '@esbuild/linux-ia32@0.26.0': optional: true - '@esbuild/linux-loong64@0.27.0': + '@esbuild/linux-loong64@0.26.0': optional: true - '@esbuild/linux-mips64el@0.27.0': + '@esbuild/linux-mips64el@0.26.0': optional: true - '@esbuild/linux-ppc64@0.27.0': + '@esbuild/linux-ppc64@0.26.0': optional: true - '@esbuild/linux-riscv64@0.27.0': + '@esbuild/linux-riscv64@0.26.0': optional: true - '@esbuild/linux-s390x@0.27.0': + '@esbuild/linux-s390x@0.26.0': optional: true - '@esbuild/linux-x64@0.27.0': + '@esbuild/linux-x64@0.26.0': optional: true - '@esbuild/netbsd-arm64@0.27.0': + '@esbuild/netbsd-arm64@0.26.0': optional: true - '@esbuild/netbsd-x64@0.27.0': + '@esbuild/netbsd-x64@0.26.0': optional: true - '@esbuild/openbsd-arm64@0.27.0': + '@esbuild/openbsd-arm64@0.26.0': optional: true - '@esbuild/openbsd-x64@0.27.0': + '@esbuild/openbsd-x64@0.26.0': optional: true - '@esbuild/openharmony-arm64@0.27.0': + '@esbuild/openharmony-arm64@0.26.0': optional: true - '@esbuild/sunos-x64@0.27.0': + '@esbuild/sunos-x64@0.26.0': optional: true - '@esbuild/win32-arm64@0.27.0': + '@esbuild/win32-arm64@0.26.0': optional: true - '@esbuild/win32-ia32@0.27.0': + '@esbuild/win32-ia32@0.26.0': optional: true - '@esbuild/win32-x64@0.27.0': + '@esbuild/win32-x64@0.26.0': optional: true '@eslint-community/eslint-utils@4.9.0(eslint@9.39.1)': @@ -2485,10 +2355,6 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node-forge@1.3.14': - dependencies: - '@types/node': 24.10.1 - '@types/node@24.10.1': dependencies: undici-types: 7.16.0 @@ -2614,13 +2480,6 @@ snapshots: '@typescript-eslint/types': 8.47.0 eslint-visitor-keys: 4.2.1 - '@typescript/vfs@1.6.2(typescript@5.4.5)': - dependencies: - debug: 4.4.3 - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - '@videojs/vhs-utils@4.0.0': dependencies: '@babel/runtime': 7.28.4 @@ -2694,8 +2553,6 @@ snapshots: acorn@8.15.0: {} - aes-cmac@4.0.0: {} - agent-base@6.0.2: dependencies: debug: 4.4.3 @@ -2977,34 +2834,34 @@ snapshots: dependencies: es-errors: 1.3.0 - esbuild@0.27.0: + esbuild@0.26.0: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.0 - '@esbuild/android-arm': 0.27.0 - '@esbuild/android-arm64': 0.27.0 - '@esbuild/android-x64': 0.27.0 - '@esbuild/darwin-arm64': 0.27.0 - '@esbuild/darwin-x64': 0.27.0 - '@esbuild/freebsd-arm64': 0.27.0 - '@esbuild/freebsd-x64': 0.27.0 - '@esbuild/linux-arm': 0.27.0 - '@esbuild/linux-arm64': 0.27.0 - '@esbuild/linux-ia32': 0.27.0 - '@esbuild/linux-loong64': 0.27.0 - '@esbuild/linux-mips64el': 0.27.0 - '@esbuild/linux-ppc64': 0.27.0 - '@esbuild/linux-riscv64': 0.27.0 - '@esbuild/linux-s390x': 0.27.0 - '@esbuild/linux-x64': 0.27.0 - '@esbuild/netbsd-arm64': 0.27.0 - '@esbuild/netbsd-x64': 0.27.0 - '@esbuild/openbsd-arm64': 0.27.0 - '@esbuild/openbsd-x64': 0.27.0 - '@esbuild/openharmony-arm64': 0.27.0 - '@esbuild/sunos-x64': 0.27.0 - '@esbuild/win32-arm64': 0.27.0 - '@esbuild/win32-ia32': 0.27.0 - '@esbuild/win32-x64': 0.27.0 + '@esbuild/aix-ppc64': 0.26.0 + '@esbuild/android-arm': 0.26.0 + '@esbuild/android-arm64': 0.26.0 + '@esbuild/android-x64': 0.26.0 + '@esbuild/darwin-arm64': 0.26.0 + '@esbuild/darwin-x64': 0.26.0 + '@esbuild/freebsd-arm64': 0.26.0 + '@esbuild/freebsd-x64': 0.26.0 + '@esbuild/linux-arm': 0.26.0 + '@esbuild/linux-arm64': 0.26.0 + '@esbuild/linux-ia32': 0.26.0 + '@esbuild/linux-loong64': 0.26.0 + '@esbuild/linux-mips64el': 0.26.0 + '@esbuild/linux-ppc64': 0.26.0 + '@esbuild/linux-riscv64': 0.26.0 + '@esbuild/linux-s390x': 0.26.0 + '@esbuild/linux-x64': 0.26.0 + '@esbuild/netbsd-arm64': 0.26.0 + '@esbuild/netbsd-x64': 0.26.0 + '@esbuild/openbsd-arm64': 0.26.0 + '@esbuild/openbsd-x64': 0.26.0 + '@esbuild/openharmony-arm64': 0.26.0 + '@esbuild/sunos-x64': 0.26.0 + '@esbuild/win32-arm64': 0.26.0 + '@esbuild/win32-ia32': 0.26.0 + '@esbuild/win32-x64': 0.26.0 escalade@3.2.0: {} @@ -3574,10 +3431,9 @@ snapshots: node-int64@0.4.0: {} - node-playready@1.1.0: + node-playready@1.1.1: dependencies: '@noble/curves': 2.0.1 - aes-cmac: 4.0.0 fast-xml-parser: 5.3.2 object-assign@4.1.1: {} @@ -4113,8 +3969,6 @@ snapshots: transitivePeerDependencies: - supports-color - typescript@5.4.5: {} - typescript@5.9.3: {} unbzip2-stream@1.4.3: @@ -4165,6 +4019,11 @@ snapshots: dependencies: isexe: 2.0.0 + widevine@1.0.1: + dependencies: + '@bufbuild/protobuf': 2.10.1 + node-forge: 1.3.1 + word-wrap@1.2.5: {} wrap-ansi@7.0.0: