ASP » Request » ClientCertificate

Request.ClientCertificate(Key [SubField])
The Key argument is a string that specifies the name of the field to retrieve. Note the use of the double quotes in the code example. A certificate contains the following seven fields:
Certificate. A string containing the binary stream of the entire certificate content.This information is stored among five types of Request collections. A collection is similar to a data structure or array. Individual items in the collection are accessed via a unique key assigned to that item. Flags. There are two flags that provide additional client certificate information. The ceCertPresent flag indicates a client certificate is present. The ceUnrecognizedIssuer flag indicates the last certification in this chain is from an unknown user.

Issuer is a string containing the subfield values that provide information about the issuer of the certificate.

SerialNumber is a string that contains the certification serial number.

Subject is a string containing the subfield values that provide information about the subject of the certificate.

ValidFrom is the date when the certificate becomes valid.

ValidUntil is the expiration date of the certificate.
The optional Subfield argument is used only with the Issuer or the Subject key fields. It is added to the key field as a suffix. For example, IssuerL which is the locality of the Issuer. Or, SubjectCN which gives the common name of the user. The allowed values are:
C is the name of the country of origin.
CN is the common name of the user.
GN is a given name.
I is a set of initials.
L is a locality.
O is the company or organization name.
OU is the name of the organizational unit.
S is a state or province.
T is the title of the person or organization.

The ClientCertificate collection property contains the values of the client certification fields of the request.

One procedure for maintaining security in electronic transactions is to use the Secure Socket Layers (SSL) protocol. If in use by the browser, this protocol sends certificates to the server that identifies the browser. The ClientCertificate collection property retrieves the values of these client certification fields. An interesting feature of this protocol is the use of the https:// prefix rather than the normal http://.

You can iterate through a collection using a For Each item in ... Next loop.

There is one mandatory argument.


This certification is valid from <%= Request.ClientCertificate("ValidFrom") %> until <%= Request.ClientCertificate("ValidUntil") %>.
This certification is valid from 9/26/96 11:59:59 PM until 9/26/97 11:59:59 PM.