Platform SDK: Logon Authentication

VerifySignature

The VerifySignature function verifies the signature of a message received.

SECURITY_STATUS VerifySignature(
  PCtxtHandle phContext,    // context to use
  PSecBufferDesc pMessage,  // message to verify
  ULONG MessageSeqNo,       // sequence number
  PULONG pfQOP              // quality of protection
);

Parameters

phContext
[in] Handle to the security context to use for the message.
pMessage
[in] Pointer to a SecBufferDesc structure that references a set of SecBuffer structures that contain the message and signature to verify. The signature is in a SecBuffer structure of type SECBUFFER_TOKEN.
MessageSeqNo
[in] Specifies the sequence number expected by the transport application, if any. If the transport application does not maintain sequence numbers, this parameter is zero.
pfQOP
[out] Pointer to a ULONG variable that receives package-specific flags that indicate the quality of protection.

Return Values

If the function verifies that the message was received in the correct sequence and has not been modified, the return value is SEC_E_OK.

If the function determines that the message is not correct according to the information in the signature, the return value can be one of the following error codes.

Value Meaning
SEC_E_OUT_OF_SEQUENCE The message was not received in the correct sequence.
SEC_E_MESSAGE_ALTERED The message has been altered.

Remarks

The VerifySignature function verifies that the message received was correct according to the information in the signature.

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

MakeSignature, SecBuffer