Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

RpcCertGeneratePrincipalName function

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

Syntax


void RpcCertGeneratePrincipalName(
  PCCERT_CONTEXT Context,
  DWORD Flags,
  UCHAR **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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcssl.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

Unicode and ANSI names

RpcCertGeneratePrincipalNameW (Unicode) and RpcCertGeneratePrincipalNameA (ANSI)

See also

Principal Names
RpcStringFree

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.