SslLookupCipherLengths function

The SslLookupCipherLengths function returns an NCRYPT_SSL_CIPHER_LENGTHS structure that contains the header and trailer lengths of the input protocol, cipher suite, and key type.

Syntax


SECURITY_STATUS WINAPI SslLookupCipherLengths(
  _In_  NCRYPT_PROV_HANDLE        hSslProvider,
  _In_  DWORD                     dwProtocol,
  _In_  DWORD                     dwCipherSuite,
  _In_  DWORD                     dwKeyType,
  _Out_ NCRYPT_SSL_CIPHER_LENGTHS *pCipherLengths,
  _In_  DWORD                     cbCipherLengths,
  _In_  DWORD                     dwFlags
);

Parameters

hSslProvider [in]

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

dwProtocol [in]

One of the CNG SSL Provider Protocol Identifier values.

dwCipherSuite [in]

One of the CNG SSL Provider Cipher Suite Identifier values.

dwKeyType [in]

One of the CNG SSL Provider Key Type Identifier values. For key types that are not elliptic curve cryptography (ECC), set this parameter to zero.

pCipherLengths [out]

A pointer to a buffer to receive the NCRYPT_SSL_CIPHER_LENGTHS structure.

cbCipherLengths [in]

The length, in bytes, of the buffer pointed to by the pCipherLengths parameter.

dwFlags [in]

This parameter is reserved for future use and must be set to zero.

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/valueDescription
NTE_INVALID_HANDLE
0x80090026L

The hSslProvider parameter contains a pointer that is not valid.

NTE_INVALID_PARAMETER
0x80090027L

The pCipherLengths parameter is set to NULL or the buffer length specified by the cbCipherLengths is too short.

NTE_BAD_FLAGS
0x80090009L

The dwFlags parameter must be set to zero.

 

Remarks

The SslLookupCipherLengths function is called for Transport Layer Security protocol (TLS) 1.1 or later conversations to query the header and trailer lengths for the requested protocol, cipher suite, and key type.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Sslprovider.h

DLL

Ncrypt.dll

 

 

Show: