SslSignHash

SslSignHash function

The SslSignHash function signs a hash by using the specified private key. The signing process is performed on the server.

Syntax


SECURITY_STATUS WINAPI SslSignHash(
  _In_  NCRYPT_PROV_HANDLE hSslProvider,
  _In_  NCRYPT_KEY_HANDLE  hPrivateKey,
  _In_  PBYTE              pbHashValue,
  _In_  DWORD              cbHashValue,
  _Out_ PBYTE              pbSignature,
  _In_  DWORD              cbSignature,
  _Out_ DWORD              *pcbResult,
  _In_  DWORD              dwFlags
);

Parameters

hSslProvider [in]

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

hPrivateKey [in]

The handle to the private key to use to sign the hash.

pbHashValue [in]

A pointer to a buffer that contains the hash to sign.

cbHashValue [in]

The size, in bytes, of the pbHashValue buffer.

pbSignature [out]

The address of a buffer that receives the signature of the hash. The cbSignature parameter contains the size of this buffer. To determine the required sized size of the buffer, set the pbSignature parameter to NULL. The required size of the buffer will be returned in the pcbResult parameter.

cbSignature [in]

The size, in bytes, of the pbSignature buffer.

pcbResult [out]

A pointer to a value that, upon completion, contains the actual number of bytes written to the pbSignature buffer.

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

One of the provided handles is not valid.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Sslprovider.h

DLL

Ncrypt.dll

 

 

Show:
© 2016 Microsoft