WMRMChallenge.ClientAttribute
Previous | Next |
WMRMChallenge.ClientAttribute
The ClientAttribute property retrieves a specific attribute, by name, from the client information section of a challenge.
Syntax
String = ClientAttribute( bstrName )
Parameters
bstrName
[in] String containing the name of the attribute to be retrieved.
Return Values
If the property succeeds, it returns a String containing the attribute. 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
This property is read-only. The ClientAttribute property does not retrieve the encrypted client ID. Only the following attribute names are valid.
Note These values are not signed and should be used for information only, not for security purposes.
Attribute name | Description |
CLIENTVERSION | Identifies the version of the DRM component on the client computer. |
SECURITYVERSION | Identifies the DRM component version in the format a.b.c.d, where a.b is the version, c is reserved, and d is the category.
Note To detect values higher than 2.10.c.d, you must use version 10.1.1 or later of the Windows Media Rights Manager SDK. |
APPSECURITY | Identifies the minimum security level that the application must have to play a packaged file. |
SUBJECTID1 | Identifies the Windows Media Format SDK on which the application is based. |
SUBJECTID2 | Identifies the application. |
DRMKVERSION | Identifies the version number of the secure audio path (SAP) kernel component. |
This property requires you to retrieve specific values and check them. However, in some situations, the new WMRMChallenge.CheckClientCapability method may be more useful because it checks for specific functionality, returning True or False.
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 |