Skip to content

Commit

Permalink
Adjust asn1c test vector code for new asn1c
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greghudson committed Oct 31, 2014
1 parent 3c330ea commit 0558407
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tests/asn.1/make-vectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 } } };
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 0558407

Please sign in to comment.