summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1999-07-11 09:20:22 +0000
committerTom Yu <tlyu@mit.edu>1999-07-11 09:20:22 +0000
commit893de5f10cdd56349d84c7283787333f08042aa6 (patch)
treed25db6fb4a52415d46f237705a6bbdb62cad313f /src/tests
parent04440a6e90e94285441f414c77768d3726fdd0a5 (diff)
downloadkrb5-893de5f10cdd56349d84c7283787333f08042aa6.tar.gz
krb5-893de5f10cdd56349d84c7283787333f08042aa6.tar.xz
krb5-893de5f10cdd56349d84c7283787333f08042aa6.zip
* 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
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/asn.1/ChangeLog5
-rw-r--r--src/tests/asn.1/krb5_decode_test.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/asn.1/ChangeLog b/src/tests/asn.1/ChangeLog
index e13c214ecd..ae8f98bf18 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 <chaoself@mit.edu>
+
+ * krb5_decode_test.c (main): Add additional test cases in
+ encryption_key to test negative integer handling.
+
1999-07-03 Tom Yu <tlyu@mit.edu>
* 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 a77abbf7ed..f1f3b702f5 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);
}
/****************************************************************/