summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/builtin
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2011-03-05 13:36:53 +0000
committerGreg Hudson <ghudson@mit.edu>2011-03-05 13:36:53 +0000
commitb2ae990817b9ccfcaabf550fc0a6c200342e42d1 (patch)
tree2e08e168bafd71226ce3a7331e0c939f90b10579 /src/lib/crypto/builtin
parent624e6a7b3f59fd76a92f556b679f9d872167853b (diff)
downloadkrb5-b2ae990817b9ccfcaabf550fc0a6c200342e42d1.tar.gz
krb5-b2ae990817b9ccfcaabf550fc0a6c200342e42d1.tar.xz
krb5-b2ae990817b9ccfcaabf550fc0a6c200342e42d1.zip
Move t_cf2 from lib/crypto/builtin to lib/crypto/crypto_tests, as it
is not specific to the builtin module. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24680 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/builtin')
-rw-r--r--src/lib/crypto/builtin/Makefile.in12
-rw-r--r--src/lib/crypto/builtin/deps2
-rw-r--r--src/lib/crypto/builtin/t_cf2.c89
-rw-r--r--src/lib/crypto/builtin/t_cf2.comments6
-rw-r--r--src/lib/crypto/builtin/t_cf2.expected5
-rw-r--r--src/lib/crypto/builtin/t_cf2.in25
6 files changed, 0 insertions, 139 deletions
diff --git a/src/lib/crypto/builtin/Makefile.in b/src/lib/crypto/builtin/Makefile.in
index 4da51b705..612d8f102 100644
--- a/src/lib/crypto/builtin/Makefile.in
+++ b/src/lib/crypto/builtin/Makefile.in
@@ -7,9 +7,6 @@ PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
DEFS=
-EXTRADEPSRCS= $(srcdir)/t_cf2.c
-
-
##DOS##BUILDTOP = ..\..\..
##DOS##PREFIXDIR = builtin
##DOS##OBJFILE = ..\$(OUTPRE)builtin.lst
@@ -52,15 +49,6 @@ includes:: depend
depend:: $(SRCS)
clean-unix:: clean-libobjs
-check-unix:: t_cf2
- $(RUN_SETUP) $(VALGRIND) ./t_cf2 <$(srcdir)/t_cf2.in >t_cf2.output
- diff t_cf2.output $(srcdir)/t_cf2.expected
-
-t_cf2$(EXEEXT): t_cf2.$(OBJEXT) $(SUPPORT_DEPLIB)
- $(CC_LINK) -o $@ t_cf2.$(OBJEXT) -lkrb5 -lk5crypto -lcom_err $(SUPPORT_LIB)
-
-clean::
- $(RM) t_cf2 t_cf2.o t_cf2.output
@lib_frag@
@libobj_frag@
diff --git a/src/lib/crypto/builtin/deps b/src/lib/crypto/builtin/deps
index d8decdd68..2b989ce1a 100644
--- a/src/lib/crypto/builtin/deps
+++ b/src/lib/crypto/builtin/deps
@@ -37,5 +37,3 @@ pbkdf2.so pbkdf2.po $(OUTPRE)pbkdf2.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
$(top_srcdir)/include/krb5/authdata_plugin.h $(top_srcdir)/include/krb5/plugin.h \
$(top_srcdir)/include/krb5/preauth_plugin.h $(top_srcdir)/include/port-sockets.h \
$(top_srcdir)/include/socket-utils.h crypto_mod.h pbkdf2.c
-t_cf2.so t_cf2.po $(OUTPRE)t_cf2.$(OBJEXT): $(BUILDTOP)/include/krb5/krb5.h \
- $(COM_ERR_DEPS) $(top_srcdir)/include/krb5.h t_cf2.c
diff --git a/src/lib/crypto/builtin/t_cf2.c b/src/lib/crypto/builtin/t_cf2.c
deleted file mode 100644
index 550192c44..000000000
--- a/src/lib/crypto/builtin/t_cf2.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/*
- * lib/crypto/t_cf2.c
- *
- * Copyright (C) 2004, 2009 by the Massachusetts Institute of Technology.
- * All rights reserved.
- *
- * Export of this software from the United States of America may
- * require a specific license from the United States Government.
- * It is the responsibility of any person or organization contemplating
- * export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission. Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
- * or implied warranty.
- *
- * This file contains tests for theKRB-FX-CF2 code in Kerberos, based
- *on the PRF regression tests. It reads an input file, and writes an
- *output file. It is assumed that the output file will be diffed
- *against expected output to see whether regression tests pass. The
- *input file is a very primitive format.
- *First line: enctype
- *second line: key to pass to string2key; also used as salt
- *Third line: second key to pass to string2key
- *fourth line: pepper1
- *fifth line: pepper2
- *scanf is used to read the file, so interior spaces are not permitted. The program outputs the hex bytes of the key.
- */
-#include <krb5.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-
-int main () {
- char pepper1[1024], pepper2[1024];
- krb5_keyblock *k1 = NULL, *k2 = NULL, *out = NULL;
- krb5_data s2k;
- unsigned int i;
- while (1) {
- krb5_enctype enctype;
- char s[1025];
-
- if (scanf( "%d", &enctype) == EOF)
- break;
- if (scanf("%1024s", &s[0]) == EOF)
- break;
- assert (krb5_init_keyblock(0, enctype, 0, &k1) == 0);
- s2k.data = &s[0];
- s2k.length = strlen(s);
- assert(krb5_c_string_to_key (0, enctype, &s2k, &s2k, k1) == 0);
- if (scanf("%1024s", &s[0]) == EOF)
- break;
- assert (krb5_init_keyblock(0, enctype, 0, &k2) == 0);
- s2k.data = &s[0];
- s2k.length = strlen(s);
- assert(krb5_c_string_to_key (0, enctype, &s2k, &s2k, k2) == 0);
- if (scanf("%1024s %1024s", pepper1, pepper2) == EOF)
- break;
- assert(krb5_c_fx_cf2_simple(0, k1, pepper1,
- k2, pepper2, &out) ==0);
- i = out->length;
- for (; i > 0; i--) {
- printf ("%02x",
- (unsigned int) ((unsigned char) out->contents[out->length-i]));
- }
- printf ("\n");
-
- krb5_free_keyblock(0,out);
- out = NULL;
-
- krb5_free_keyblock(0, k1);
- k1 = NULL;
- krb5_free_keyblock(0, k2);
- k2 = NULL;
- }
-
- return (0);
-}
diff --git a/src/lib/crypto/builtin/t_cf2.comments b/src/lib/crypto/builtin/t_cf2.comments
deleted file mode 100644
index 0643b6507..000000000
--- a/src/lib/crypto/builtin/t_cf2.comments
+++ /dev/null
@@ -1,6 +0,0 @@
-The first test mirrors the first two tests in t_prf.in.
-
-The second test mirrors the following four tests in t_prf.in.
-
-The third and fourth tests are simple tests of the DES and 3DES PRF.
-The fifth test is the same simple test for RC4.
diff --git a/src/lib/crypto/builtin/t_cf2.expected b/src/lib/crypto/builtin/t_cf2.expected
deleted file mode 100644
index 007000f21..000000000
--- a/src/lib/crypto/builtin/t_cf2.expected
+++ /dev/null
@@ -1,5 +0,0 @@
-97df97e4b798b29eb31ed7280287a92a
-4d6ca4e629785c1f01baf55e2e548566b9617ae3a96868c337cb93b5e72b1c7b
-43bae3738c9467e6
-e58f9eb643862c13ad38e529313462a7f73e62834fe54a01
-24d7f6b6bae4e5c00d2082c5ebab3672
diff --git a/src/lib/crypto/builtin/t_cf2.in b/src/lib/crypto/builtin/t_cf2.in
deleted file mode 100644
index 094c2392f..000000000
--- a/src/lib/crypto/builtin/t_cf2.in
+++ /dev/null
@@ -1,25 +0,0 @@
-17
-key1
-key2
-a
-b
-18
-key1
-key2
-a
-b
-1
-key1
-key2
-a
-b
-16
-key1
-key2
-a
-b
-23
-key1
-key2
-a
-b