krb5 commit: Adjust asn1c test vector code for new asn1c

Greg Hudson ghudson at mit.edu
Fri Oct 31 13:03:00 EDT 2014


https://github.com/krb5/krb5/commit/0558407467d9e35148f3c40babbc4551ef982e73
commit 0558407467d9e35148f3c40babbc4551ef982e73
Author: Greg Hudson <ghudson at mit.edu>
Date:   Tue Oct 28 14:31:19 2014 -0400

    Adjust asn1c test vector code for new asn1c
    
    asn1c 0.9.22 added support for representing integers using unsigned
    types if they have appropriate constraints.  This changes the
    representation of RFC4120's UInt32 type from Integer_t to unsigned
    long.  In make-vectors.c, this means we can use a static initializer
    for kvno, and that the old method of calling asn_long2INTEGER doesn't
    work.  Adjust make-vectors.c to assume the newer version of asn1c.

 src/tests/asn.1/make-vectors.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/tests/asn.1/make-vectors.c b/src/tests/asn.1/make-vectors.c
index 93a072c..c5aa5b3 100644
--- a/src/tests/asn.1/make-vectors.c
+++ b/src/tests/asn.1/make-vectors.c
@@ -101,7 +101,7 @@ static PA_OTP_CHALLENGE_t challenge_2 = { { "maxnonce", 8 }, &service,
                                           &s2kparams };
 
 /* Minimal PA-OTP-REQUEST */
-static UInt32_t kvno;           /* Initialized to 5 in main(). */
+static UInt32_t kvno = 5;
 static PA_OTP_REQUEST_t request_1 = { { "\0\0\0\0", 4, 0 }, NULL,
                                       { 0, &kvno,
                                         { "krbASN.1 test message", 21 } } };
@@ -153,7 +153,6 @@ main()
 {
     /* Initialize values which can't use static initializers. */
     asn_long2INTEGER(&otp_format, 2);  /* Alphanumeric */
-    asn_long2INTEGER(&kvno, 5);
     OBJECT_IDENTIFIER_set_arcs(&alg_sha256.algorithm, sha256_arcs,
                                sizeof(*sha256_arcs),
                                sizeof(sha256_arcs) / sizeof(*sha256_arcs));


More information about the cvs-krb5 mailing list