Bewerken

Delen via


SslCreateHandshakeHash function

The SslCreateHandshakeHash function obtains a hash handle that is used to hash handshake messages.

Syntax

SECURITY_STATUS WINAPI SslCreateHandshakeHash(
  _In_  NCRYPT_PROV_HANDLE hSslProvider,
  _Out_ NCRYPT_HASH_HANDLE *phHandshakeHash,
  _In_  DWORD              dwProtocol,
  _In_  DWORD              dwCipherSuite,
  _In_  DWORD              dwFlags
);

Parameters

hSslProvider [in]

The handle of the Secure Sockets Layer protocol (SSL) protocol provider instance.

phHandshakeHash [out]

A hash handle that can be passed to other SSL provider functions.

dwProtocol [in]

One of the CNG SSL Provider Protocol Identifier values.

Note

This function is not used with the SSL 2.0 protocol.

dwCipherSuite [in]

One of the CNG SSL Provider Cipher Suite Identifier values.

dwFlags [in]

This parameter is reserved for future use.

Return value

If the function succeeds, it returns zero.

If the function fails, it returns a nonzero error value.

Possible return codes include, but are not limited to, the following.

Return code/value Description
NTE_NO_MEMORY
0x8009000EL
There is insufficient memory to allocate the hash buffer.
NTE_INVALID_HANDLE
0x80090026L
The hSslProvider handle is not valid.
NTE_INVALID_PARAMETER
0x80090027L
The phHandshakeHash is null.

Remarks

The SslCreateHandshakeHash function is one of three functions used to generate a hash to use during the SSL handshake.

  1. The SslCreateHandshakeHash function is called to obtain a hash handle.
  2. The SslHashHandshake function is called any number of times with the hash handle to add data to the hash.
  3. The SslComputeFinishedHash function is called with the hash handle to obtain the digest of the hashed data.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Sslprovider.h
DLL
Ncrypt.dll