Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function generates a cryptographic checksum of the message and includes sequencing information to prevent message loss or insertion. The function allows the application to choose between several cryptographic algorithms, if supported by the chosen mechanism.

Syntax

SECURITY_STATUS SEC_ENTRY MakeSignature( 
  PCtxtHandle
 phContext, 
  ULONG
 fQOP, 
  PSecBufferDesc
 pMessage, 
  ULONG
 MessageSeqNo 
);

Parameters

phContext

[in] Pointer to a CtxtHandlestructure identifying the context handle. For information on CtxtHandle, see SSPI Handles.

fQOP

[in] Package-specific flags that indicate the quality of protection. A security package can use this parameter to enable the selection of cryptographic algorithms.

pMessage

[in, out] Pointer to a SecBufferDescstructure. On input, the structure references one or more SecBufferstructures that contain the message to be signed. The function does not process buffers with the SECBUFFER_READONLY attribute.

The SecBufferDescstructure also references a SecBufferstructure of type SECBUFFER_TOKEN that receives the signature.

MessageSeqNo

[in] A message sequence number that the transport application assigned to the message. If the transport application does not maintain sequence numbers, this parameter is zero.

Return Value

Returns SEC_E_OK to indicate success. The function returns a nonzero error value to indicate failure.

Remarks

This function generates a signature that is based on the message and the session key for the context.

If the transport application has created the security context to support sequence detection and provides a sequence number to this function, this information is included in the signature. The context protects against the reply, insertion, and suppression of messages. The security package will incorporate the sequence number passed from the transport application.

Requirements

Header security.h, sspi.h
Library secur32.lib
Windows Embedded CE Windows CE 2.10 and later
Windows Mobile Smartphone 2002 and later

See Also