2.2.3.2.32 Predefined Variables in DRM Expressions

Each license must create and access its own unique collection of attribute/value pairs. After being created, they cannot be deleted. A license can access only the attribute/value pairs that it created.

The attributes must belong to one of the following categories:

  • drm

  • drmk

  • license

  • pmlicense

  • content

  • machine

  • server

  • app (application)

  • secstate (secure state in the client)

The following table enumerates all possible attributes that a license can expose.

Variable

Data type

Description

drm.version

STRING

The Digital Rights Management (DRM) version. This variable does not use the build number; it instead uses the hard-coded value in the client.

drm.bb.msdrm.version

STRING

The current security version of the WMDRM client. This value will be in the form "a.b.c.d".  Because this information is not signed, the value cannot be trusted by the client.

drmk.version

STRING

The version of the kernel mode DRM file (DRMK) on the client computer. This variable does not exist on a computer without DRMK. Use exists (drmk.version) to check for the presence of DRMK.

drmk.parameter

STRING

A string to use to set up DRMK. The string takes the form "attr=value;attr=value;" and so on. Supported attributes are spdif, certs, and mindrmdriverlevel. The default values for all are true, false, and 1000. If certs is true, audio and/or video output device drivers that are certified by Microsoft for use in the client-side media playback pipeline are required. The mindrmlevel attribute indicates the level of security that is needed for the drivers; do not use this attribute if certs is false. The spdif attribute allows the transfer of audio from one file to another without conversion to and from an analog format. If true, this type of transfer is allowed. If false, this type of transfer is not allowed.

machine.datetime

DATETIME

The time, in Coordinated Universal Time (UTC) format, based on the clock of the client computer.

app.count

LONG

The number of DRM certificates used currently by client.<4>

app.minseclevel

LONG

The minimum security level, which is computed from the supplied application certificates.

app.appsubjid

LONG

The application subject ID, provided in the supplied application certificates.

secstate.<attribute>

Any

The specified attribute value (for example, "secstate.firstdateofuse"). If the attribute does not exist, an error is returned. For assignments, the attribute is created if it does not already exist. Its type is the same as the type of the value assigned to it.

secstate.global.saveddatetime

DATETIME

The last saved clock time, as recorded by the DRM system. This is particularly useful for the ONCLOCKROLLBACK event. It is a read-only field for the license.

license.<attribute>

STRING

The value of the attribute in the license LICENSORINFO>/<DATA section (for example, "license.LID" or "license.KID"). The attribute is case-sensitive. It is possible that the value is an extensible markup language (XML) string. For example, license.META gives the entire XML string for the META section, without the META tags.

content.<attribute>

STRING

The value of the attribute in the content header DATA section (for example, "content.CID").

pmlicense.version (see note below)

STRING

The version of the Portable Media (PM) license being requested. This field is read-only and can be used in the CONDITION section of the rights that provide the PM license. Here CONDITION refers to the <CONDITION> element when used under the <ONACTION>, <ONSELECT>, or <ONSTORE> element.

pmlicense.rights (see note below)

LONG

The rights to use for generating the PM license if creating a license is allowed. Otherwise, this value is ignored. The default value is 0.

pmlicense.appseclevel (see note below)

LONG

The application security level to use for generating the PM license if creating a license is allowed. Otherwise, this value is ignored. The default value is 0.

pmlicense.expirydate (see note below)

DATETIME

The date to use for generating the PM license if creating one is allowed. The default value is #19991231Z#.

Note A license server can issue a Portable Media license, which supports the moving of content to devices other than a PC. A server can automatically include this right when issuing a license for a request in which Play is the only requested right. The license is based on the DRM Version 1 License Format. In the DRM Version 7 License Format, the last four variables in the preceding table are used in the ONACTION element to provide the means of generating a PM license.