Specifying a License Chain When Protecting Content
When you protect content, you specify the elements of its license chain by adding an uplink ID, which is the key ID of the root license. The content owner must work with the license issuer to determine the structure of the license chain and the values of the uplink IDs.
- Use WMRMHeader.KeyID to specify the key ID of the leaf license, which is the beginning of the chain.
- Use WMRMHeader.AddUplink to specify the uplink ID, which indicates the key ID of the root element in the license chain.
- Use WMRMHeader.RemoveUplink to remove an uplink ID if necessary.
Example Code
Dim KeyObj ' WMRMKeys object
Dim RootKID ' Key ID of the root license
Dim LeafKID ' Key ID of the leaf license
Dim LKSeed ' License key seed
Dim ContentKey ' Key of the leaf license
'Generate root and leaf key IDs.
Set KeyObj = Server.CreateObject("WMRMObjs.WMRMKeys")
RootKID = KeyObj.GenerateKeyID()
LeafKID = KeyObj.GenerateKeyID()
' Generate the content key for the leaf license.
KeyObj.Seed = LKSeed
KeyObj.KeyID = LeafKID
ContentKey = KeyObj.GenerateKey()
'Set values into the content header and sign it.
Set HeaderObj = Server.CreateObject("WMRMObjs.WMRMHeader")
HeaderObj.KeyID = LeafKID
HeaderObj.LicenseAcqURL = LicURL
' Add the root key ID to the license to indicate a chain.
HeaderObj.AddUplink(RootKid)
' Continue protecting the content.
See Also