Alberto Fondi <[EMAIL PROTECTED]> writes:
> Hi Simom,
>
>
> i have made different test with shishi as client and shishid ad KDC
> and with the same account and i report you the nounce couples
> (request, reply):
>
> request nonce (len=4) 1fd69fea
> reply nonce (len=1) ea
>
> request nonce (len=4) 766e2dd0
> reply nonce (len=1) d0
>
> request nonce (len=4) 64e27ec2
> reply nonce (len=1) c2
>
> request nonce (len=4) 1551d4af
> reply nonce (len=1) af
>
> request nonce (len=4) 6625fc6d
> reply nonce (len=2) fc6d
>
> request nonce (len=4) 6cc4edc5
> reply nonce (len=1) c5
>
> request nonce (len=4) 6cf3b668
> reply nonce (len=2) b668
>
> request nonce (len=4) 37b72c09
> reply nonce (len=3) b72c09
>
> request nonce (len=4) 534f36d8
> reply nonce (len=1) d8
>
> As you suggested me, and as you can see from these tests, it seems
> like the reply nonce is only the last part of the request nonce, but
> the lenght of this part is variable!.
>
> Could it be a pointer offset error ?
I wasn't able to reproduce the problem exactly as you reported, but at
least there were an error that caused the nonces to mismatch, and I
suspect both errors were caused by the same bug.
The patch below should fix it, this has been installed in CVS, and I'm
now going to work on fixing the TLS stuff to match the latest draft,
and then release 0.0.30. Either apply the patch below and test it
again and tell me if it works or not, or wait for 0.0.30.
Thanks for the report!
/Simon
Index: asn1.c
===================================================================
RCS file: /home/jas/self/public-cvs/shishi/lib/asn1.c,v
retrieving revision 1.82
retrieving revision 1.84
diff -u -p -r1.82 -r1.84
--- asn1.c 27 Apr 2006 09:07:12 -0000 1.82
+++ asn1.c 1 Nov 2006 12:43:54 -0000 1.84
@@ -229,6 +229,11 @@ shishi_asn1_read_optional (Shishi * hand
return SHISHI_OK;
}
+#define C2I(buf) ((buf[3] & 0xFF) | \
+ ((buf[2] & 0xFF) << 8) | \
+ ((buf[1] & 0xFF) << 16) | \
+ ((buf[0] & 0xFF) << 24))
+
int
shishi_asn1_read_int32 (Shishi * handle, Shishi_asn1 node,
const char *field, int32_t * i)
@@ -251,7 +256,7 @@ shishi_asn1_read_int32 (Shishi * handle,
if (rc != SHISHI_OK)
return rc;
}
- *i = buf[3] | (buf[2] << 8) | (buf[1] << 16) | (buf[0] << 24);
+ *i = C2I (buf);
return SHISHI_OK;
}
_______________________________________________
Help-shishi mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-shishi