|
Posted by Roman Prokhorov on October 17, 2005, 4:52 pm
If you were Registered and logged in, you could reply and use other advanced thread options
Hi,
The
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauth
n/security/verifysignature.asp> contains the following phrase:
-------
[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.
When using the Digest SSP, the message and signature are in a single
SecBuffer structure.
--------
Normally (e.g. for Kerberos) I need SecBufferDesc with two SecBuffer
items: SECBUFFER_TOKEN with the signature and SECBUFFER_DATA with the
message. But what about the Digest and WDigest?
I tried composing a single item with 16-byte segnature followed by the
message, but it returned SEC_E_INVALID_TOKEN.
I also tried the "normal" way with two SecBuffer items but it didn't
work either: if SECBUFFER_DATA is less than 16 bytes long it returned
SEC_E_INVALID_TOKEN which leads me to believe that it expects not
message but signature (which is 16 bytes) and pasting signature with
message is needed. Otherwise if it's greater than 16 bytes it returns
SEC_E_OUT_OF_SEQUENCE, even if I see that the sequence number is zero.
Does anyone has a sample code how to use VerifySignature with WDigest
protocol?
--
Roman
|