]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Adjust asn1c test vector code for new asn1c 228/head
authorGreg Hudson <ghudson@mit.edu>
Tue, 28 Oct 2014 18:31:19 +0000 (14:31 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 31 Oct 2014 17:01:44 +0000 (13:01 -0400)
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

index 93a072ccd37bd8d5c8c59b5d92d158a45a81e897..c5aa5b3855ca49fdf5f9be619d94631b0becb362 100644 (file)
@@ -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));