IX509CertificateRequestPkcs10::put_KeyContainerNamePrefix method (certenroll.h)

The KeyContainerNamePrefix property specifies or retrieves a prefix used to create the container name for a new private key.

This property is read/write.

Syntax

HRESULT put_KeyContainerNamePrefix(
  BSTR Value
);

Parameters

Value

Return value

None

Remarks

Each CryptoAPI cryptographic service provider or Cryptography API: Next Generation (CNG) key provider maintains a key container for the private key. To retrieve the name of a key container for an existing key, use the ContainerName property of the IX509PrivateKey object.

A prefix can contain any string limited to the maximum length of the key container name and to legal container name characters. For example, if you do not call the ContainerName property to specify a key container name, one is automatically created when the private key is created, and the prefix to the container name will be the string "lp". For another example, if you are creating a test harness and want to differentiate key containers by the programs that generated them, you can use the name of the executable as the prefix.

You must set this property before calling the Encode method, and you must initialize the IX509CertificateRequestPkcs10 object before calling this property. For more information, see any of the following methods:

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h
DLL CertEnroll.dll

See also

IX509CertificateRequestPkcs10