RpcCertGeneratePrincipalName function (rpcssl.h)

Server programs use the RpcCertGeneratePrincipalName function to generate principal names for security certificates.

Syntax

RPC_STATUS RpcCertGeneratePrincipalName(
  PCCERT_CONTEXT Context,
  DWORD          Flags,
  RPC_CSTR       *pBuffer
);

Parameters

Context

Pointer to the security-certificate context.

Flags

Currently, the only valid flag for this parameter is RPC_C_FULL_CERT_CHAIN. Using this flag causes the principal name to be generated in fullsic format.

pBuffer

Pointer to a pointer. The RpcCertGeneratePrincipalName function sets this to point at a null-terminated string that contains the principal name.

Return value

This function does not return a value.

Remarks

By default, the principal name that the RpcCertGeneratePrincipalName function passes back is in msstd format. To generate a name in fullsic format, pass RPC_C_FULL_CERT_CHAIN as the value for the Flags parameter.

Your application must call RpcStringFree to release the memory for the string which contains the principal name.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header rpcssl.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also

Principal Names

RpcStringFree