[3544] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

[krbdev.mit.edu #1224] asn1_k_encode.c: add_optstring always adds

daemon@ATHENA.MIT.EDU (Ezra Peisach via RT)
Wed Oct 23 18:22:20 2002

Message-Id: <rt-1224-3210.8.41297418524746@krbdev.mit.edu>
In-Reply-To: <rt-1224@krbdev.mit.edu>
From: "Ezra Peisach via RT" <rt-comment@krbdev.mit.edu>
Reply-To: rt-comment@krbdev.mit.edu
To: krb5-prs@mit.edu
Errors-To: krb5-bugs-admin@mit.edu
Date: Wed, 23 Oct 2002 18:21:02 -0400 (EDT)



In lib/krb5/asn.1/asn1_k_encode.c line 758,  add_optstring is 
defined

#define add_optstring(val,n,fn) \
     if ((val).length >= 0)
{asn1_addlenfield((val).length,(val).data,n,fn);}

The comparison should be > 0 - not >= 0.

The only code affected by this change is the sam challenge encoders.


In draft-ietf-krb-wg-kerberos-sam-01.txt all of the fields are listed as
optional general strings - so a zero length string should not be sent.

If the above change is made - then the krb5_encode_test (tests/asn1)
fails - in the sam code.

I would like to fix both the asn.1 encoder and the test output.
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
http://mailman.mit.edu/mailman/listinfo/krb5-bugs

home help back first fref pref prev next nref lref last post