Initial revision
authorJohn Kohl <jtkohl@mit.edu>
Tue, 29 Jan 1991 16:38:02 +0000 (16:38 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Tue, 29 Jan 1991 16:38:02 +0000 (16:38 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1640 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/rtest.c [new file with mode: 0644]
src/kdc/rtest.good [new file with mode: 0644]
src/kdc/rtscript [new file with mode: 0644]

diff --git a/src/kdc/rtest.c b/src/kdc/rtest.c
new file mode 100644 (file)
index 0000000..a1b132f
--- /dev/null
@@ -0,0 +1,57 @@
+#include <krb5/krb5.h>
+#include <krb5/ext-proto.h>
+#include <krb5/kdb.h>
+#include <stdio.h>
+#include "kdc_util.h"
+
+void
+main(argc,argv)
+    int        argc;
+    char *argv[];
+    {
+       krb5_data otrans;
+       krb5_data ntrans;
+
+       krb5_data *tgnames[10];
+       krb5_principal tgs = tgnames;
+       krb5_data tgsrlm;
+
+       krb5_data *cnames[10];
+       krb5_principal cl = cnames;
+       krb5_data crlm;
+
+       krb5_data *snames[10];
+       krb5_principal sv = snames;
+       krb5_data srlm;
+
+       if (argc < 4) {
+           fprintf(stderr, "not enough args\n");
+           exit(1);
+       }
+       ntrans.length = 0;
+       otrans.length = strlen(argv[1]) + 1;
+       otrans.data = (char *) malloc(otrans.length);
+       strcpy(otrans.data,argv[1]);
+
+       tgsrlm.length = strlen(argv[2]) + 1;
+       tgsrlm.data = (char *) malloc(tgsrlm.length);
+       strcpy(tgsrlm.data,argv[2]);
+       tgs[0] = &tgsrlm;
+
+       crlm.length = strlen(argv[3]) + 1;
+       crlm.data = (char *) malloc(crlm.length);
+       strcpy(crlm.data,argv[3]);
+       cl[0] = &crlm;
+
+       srlm.length = strlen(argv[4]) + 1;
+       srlm.data = (char *) malloc(srlm.length);
+       strcpy(srlm.data,argv[4]);
+       sv[0] = &srlm;
+       
+       add_to_transited(&otrans,&ntrans,tgs,cl,sv);
+
+       printf("%s\n",ntrans.data);
+
+    }
+
+krb5_encrypt_block master_encblock;
diff --git a/src/kdc/rtest.good b/src/kdc/rtest.good
new file mode 100644 (file)
index 0000000..4eecf6e
--- /dev/null
@@ -0,0 +1,26 @@
+ATHENA.MIT.EDU
+MIT.EDU,ATHENA.
+EDU,MIT.,ATHENA.
+EDU,MIT.,ATHENA.,WASHINGTON.EDU
+EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.
+EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.
+EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.,SUB3W.CS.WASHINGTON.EDU
+EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.
+EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.
+EDU,ATHENA.MIT.,SUB2M.,WASHINGTON.EDU,CS.
+/EDU/MIT/ATHENA
+/EDU/MIT,/ATHENA
+/EDU/MIT,/ATHENA
+/EDU,/MIT,/ATHENA
+/EDU,/MIT,/ATHENA, /EDU/WASHINGTON
+/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS
+/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W
+/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W, /EDU/WASHINGTON/CS/SUB3W
+/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W
+/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W
+/EDU,/MIT/ATHENA,/SUB2M, /EDU/WASHINGTON,/CS
+EDU,MIT.,ATHENA.,ATEST., /COM,/HP,/APOLLO
+EDU,MIT.,ATHENA., /COM,/HP,/APOLLO,/HTEST
+/COM,/HP,/APOLLO,EDU,MIT.,ATHENA.,ATEST.
+/COM,/HP,/APOLLO,ATHENA.MIT.EDU
+EDU,MIT.,ATHENA., /COM/HP/APOLLO/HTEST
diff --git a/src/kdc/rtscript b/src/kdc/rtscript
new file mode 100644 (file)
index 0000000..04f2d0f
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+# should print:
+#ATHENA.MIT.EDU
+#MIT.EDU,ATHENA.
+#EDU,MIT.,ATHENA.
+#EDU,MIT.,ATHENA.,WASHINGTON.EDU
+#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.
+#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.
+#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.,SUB3W.CS.WASHINGTON.EDU
+#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.
+#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.
+#EDU,ATHENA.MIT.,SUB2M.,WASHINGTON.EDU,CS.
+#
+./rtest "" ATHENA.MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest ATHENA.MIT.EDU MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "MIT.EDU,ATHENA." EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "EDU,MIT.,ATHENA." WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU" CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS." SUB2W.CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W." SUB3W.CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W." SUB1W.CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W." SUB1M.ATHENA.MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU
+./rtest "EDU,SUB2M.ATHENA.MIT.,WASHINGTON.EDU,CS." ATHENA.MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU