WMRMChallenge.Challenge
Previous | Next |
WMRMChallenge.Challenge
The Challenge property specifies and retrieves the license request.
Syntax
WMRMChallenge .Challenge = String String = Challenge
Parameters
This property takes no parameters.
Return Values
If the property succeeds, it returns a String containing the challenge from the consumer. If it fails, it returns a number in the error object.
Return code | Description |
0x80004005 | An unspecified error occurred. |
0x80070057 | The specified parameter is not valid. |
Remarks
A challenge contains the following information:
- Version 10 content header (backward compatible with version 7.1).
- The key ID used to create a key.
- An optional content ID to uniquely identify the encrypted content.
- Optional attributes that identify the content.
- A URL identifying the Internet address of the license issuer.
- Information about the consumer's computer.
- An encrypted client ID.
- The version of Windows Media Rights Manager on the consumer's computer.
- The individualized version number on the consumer's computer.
- Action list indicating the rights requested by the consumer.
- An optional Windows Media Rights Manager version 1 challenge This is included because versions of the player earlier than version 7 cannot process version 7 or later licenses. However, it is not included when a license is predelivered.
Example Code
' Assume that the content packager has sent encrypted content and ' a header to a consumer. The consumer's computer determines that ' a license is needed and posts a challenge to the license issuer. ' The challenge contains the header sent by the content packager, ' actions requested by the client, and information about the client ' computer. ' ' For more information about the header, see the WMRMHeader object. ' Declare variables and objects. Dim sHeader, sClientInfo, sPubKey, lResult, dwActionCnt Dim sLicRequest, lIndex, sVerClient, sVerSecurity, sAppSecurity Dim sAction() Dim HeaderObj Dim ChallengeObj ' Create objects. Set HeaderObj = Server.CreateObject("Wmrmobjs.WMRMHeader") Set ChallengeObj = Server.CreateObject("Wmrmobjs.WMRMChallenge") ' Retrieve the license request from the client computer. sLicRequest = request.Form("challenge") ' Set the license request into the WMRMChallenge object. ChallengeObj.Challenge = sLicRequest ' Retrieve the header from the challenge. sHeader = ChallengeObj.Header ' Set the header into the WMRMHeader object. HeaderObj.Header = sHeader ' Verify the header with the public key created by the content ' packager. lResult = HeaderObj.Verify(sPubKey) if (lResult = 0) then ' The header has been corrupted. end if ' Retrieve the client information section of the challenge. sClientInfo = ChallengeObj.ClientInfo ' Retrieve attributes from the client. sVerClient = ChallengeObj.ClientAttribute("CLIENTVERSION" ) ' Perform actions based on the DRM component ' version installed on the client computer. sVerSecurity = ChallengeObj.ClientAttribute("SECURITYVERSION") ' Perform actions based on the security version number. sAppSecurity = ChallengeObj.ClientAttribute("APPSECURITY") ' Perform actions based on the security level of the ' application on which the Windows Media file is to ' be played.
Requirements
Version: Windows Media Rights Manager 7 SDK or later
Reference: wmrmobjs 1.0 Type Library
Library: wmrmobjs.dll
Platform: Windows Server 2003
See Also
Previous | Next |