SslGetServerIdentity function (schannel.h)

The SslGetServerIdentity function gets the identity of the server. This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Schannel.dll.

Syntax

SECURITY_STATUS SslGetServerIdentity(
  [in]  PBYTE  ClientHello,
  [in]  DWORD  ClientHelloSize,
  [out] PBYTE  *ServerIdentity,
  [out] PDWORD ServerIdentitySize,
  [in]  DWORD  Flags
);

Parameters

[in] ClientHello

The message from the client.

[in] ClientHelloSize

The size of the client message.

[out] ServerIdentity

The pointer inside the message where the server name starts.

[out] ServerIdentitySize

The length of the server name.

[in] Flags

This parameter is reserved and must be zero.

Return value

The status of the call to the function.

Return code Description
SEC_E_OK
The function was successful.
SEC_E_INVALID_PARAMETER
One of the parameters ClientHello, ServerIdentity, or ServerIdentitySize is NULL.
SEC_E_INCOMPLETE_MESSAGE
The ServerIdentitySize parameter is smaller than the ClientHelloSize parameter.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header schannel.h
DLL Schannel.dll