Platform SDK: Logon Authentication

MakeSignature

The MakeSignature function generates a cryptographic checksum of the message, and also includes sequencing information to prevent message loss or insertion. MakeSignature allows the application to choose between several cryptographic algorithms, if supported by the chosen mechanism. The MakeSignature function uses the security context referenced by the context handle.

SECURITY_STATUS MakeSignature(
  PCtxtHandle phContext,     // context to use
  ULONG fQOP,                // quality of protection
  PSecBufferDesc pMessage,   // message to sign
  ULONG MessageSeqNo         // message sequence number
);

Parameters

phContext
[in] Handle to the security context to use to sign the message.
fQOP
[in] Specifies 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 SecBufferDesc structure. On input, the structure references one or more SecBuffer structures that contain the message to be signed. The function does not process buffers with the SECBUFFER_READONLY attribute.

The SecBufferDesc structure also references a SecBuffer structure of type SECBUFFER_TOKEN that receives the signature.

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

Return Values

If the function succeeds, the return value is SEC_E_OK.

If the function fails, the return value is a nonzero error code.

Remarks

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

If the transport application created the security context to support sequence detection and the caller provides a sequence number, the function includes this information in the signature. This protects against reply, insertion, and suppression of messages. The security package incorporates the sequence number passed down from the transport application.

The prototype for this function can be found in Sspi.h.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Sspi.h; include Security.h.
  Library: Use Secur32.lib.

See Also

SecBuffer, SecBufferDesc, VerifySignature