Setting the Machine Default CSP

One machine default CSP can be specified for each CSP type. This entry is used when an application calls the CryptAcquireContext function with only a CSP type specified, and no user default CSP Registry entry exists.

The typical CSP Setup program will install its CSP as the machine default.

The following Registry entry sets the machine default CSP:

HKEY_LOCAL_MACHINE
SOFTWARE
Microsoft
Cryptography
Defaults
Provider Types
Type
<CSP type>
>Name:REG_SZ:<CSP name>

The "CSP type" portion of the key name must be in decimal format, and exactly 3 digits in length. For example, if the CSP is of type 25, the key name would be "Type 025".

The "Name" entry must be set to the textual name of the CSP. This must exactly match the "CSP name" Registry key discussed in the previous section.