From: Tom Yu Date: Sun, 11 Jul 1999 09:20:22 +0000 (+0000) Subject: * krb5_decode_test.c (main): Add additional test cases in X-Git-Tag: krb5-1.1-beta1~63 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=893de5f10cdd56349d84c7283787333f08042aa6;p=krb5.git * krb5_decode_test.c (main): Add additional test cases in encryption_key to test negative integer handling. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11559 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/asn.1/ChangeLog b/src/tests/asn.1/ChangeLog index e13c214ec..ae8f98bf1 100644 --- a/src/tests/asn.1/ChangeLog +++ b/src/tests/asn.1/ChangeLog @@ -1,3 +1,8 @@ +Sat Jul 10 10:32:31 1999 Tom Yu + + * krb5_decode_test.c (main): Add additional test cases in + encryption_key to test negative integer handling. + 1999-07-03 Tom Yu * krb5_decode_test.c (main): Add test cases for encryption_key in diff --git a/src/tests/asn.1/krb5_decode_test.c b/src/tests/asn.1/krb5_decode_test.c index a77abbf7e..f1f3b702f 100644 --- a/src/tests/asn.1/krb5_decode_test.c +++ b/src/tests/asn.1/krb5_decode_test.c @@ -79,6 +79,16 @@ int main(argc, argv) decode_run("encryption_key(indefinite lengths)","","30 80 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 00 00",decode_krb5_encryption_key,ktest_equal_encryption_key); decode_run("encryption_key(indefinite lengths + trailing [2] INTEGER)","","30 80 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A2 03 02 01 01 00 00",decode_krb5_encryption_key,ktest_equal_encryption_key); decode_run("encryption_key(indefinite lengths + trailing [2] SEQUENCE {[0] INTEGER})","","30 80 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A2 80 30 80 A0 03 02 01 01 00 00 00 00 00 00",decode_krb5_encryption_key,ktest_equal_encryption_key); + ref.enctype = -1; + decode_run("encryption_key(enctype = -1)","","30 11 A0 03 02 01 FF A1 0A 04 08 31 32 33 34 35 36 37 38",decode_krb5_encryption_key,ktest_equal_encryption_key); + ref.enctype = -255; + decode_run("encryption_key(enctype = -255)","","30 12 A0 04 02 02 FF 01 A1 0A 04 08 31 32 33 34 35 36 37 38",decode_krb5_encryption_key,ktest_equal_encryption_key); + ref.enctype = 255; + decode_run("encryption_key(enctype = 255)","","30 12 A0 04 02 02 00 FF A1 0A 04 08 31 32 33 34 35 36 37 38",decode_krb5_encryption_key,ktest_equal_encryption_key); + ref.enctype = -2147483648; + decode_run("encryption_key(enctype = -2147483648)","","30 14 A0 06 02 04 80 00 00 00 A1 0A 04 08 31 32 33 34 35 36 37 38",decode_krb5_encryption_key,ktest_equal_encryption_key); + ref.enctype = 2147483647; + decode_run("encryption_key(enctype = 2147483647)","","30 14 A0 06 02 04 7F FF FF FF A1 0A 04 08 31 32 33 34 35 36 37 38",decode_krb5_encryption_key,ktest_equal_encryption_key); } /****************************************************************/