From 6e90b794d221f0b98a72c5e2977daa11bfb61768 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 27 May 1995 01:45:10 +0000 Subject: [PATCH] Added new function, des_cblock_print_file(), which is referenced by libkrb4.a. (Even though it's never used, some OS's demand that all of the references in a shared library have to be resolved.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5906 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/des425/ChangeLog | 7 +++++++ src/lib/des425/Makefile.in | 26 +++++++++++++++++++++++-- src/lib/des425/configure.in | 3 +++ src/lib/des425/util.c | 38 +++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 src/lib/des425/util.c diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index 4fb8a9aa8..d1c133a47 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,3 +1,10 @@ +Fri May 26 21:43:52 1995 Theodore Y. Ts'o (tytso@dcl) + + * util.c: Added new function, des_cblock_print_file(), which is + referenced by libkrb4.a. (Even though it's never used, + some OS's demand that all of the references in a + shared library have to be resolved.) + Mon May 1 11:29:37 1995 Ezra Peisach (epeisach@kangaroo.mit.edu) * read_passwd.c: (des_read_pw_string): Call to krb5_read_password diff --git a/src/lib/des425/Makefile.in b/src/lib/des425/Makefile.in index 7cc8a5202..a79f3506b 100644 --- a/src/lib/des425/Makefile.in +++ b/src/lib/des425/Makefile.in @@ -5,6 +5,10 @@ LDFLAGS = -g ##DOSLIBNAME=libdes425.lib ##DOS!include $(BUILDTOP)\config\windows.in +.c.o: + $(CC) $(CFLAGS) -c $(srcdir)/$*.c +@SHARED_RULE@ + OBJS= cksum.$(OBJEXT) \ des.$(OBJEXT) \ enc_dec.$(OBJEXT) \ @@ -17,6 +21,7 @@ OBJS= cksum.$(OBJEXT) \ read_passwd.$(OBJEXT) \ str_to_key.$(OBJEXT) \ unix_time.$(OBJEXT) \ + util.$(OBJEXT) \ weak_key.$(OBJEXT) SRCS= $(srcdir)/cksum.c \ @@ -31,13 +36,24 @@ SRCS= $(srcdir)/cksum.c \ $(srcdir)/read_passwd.c \ $(srcdir)/str_to_key.c \ $(srcdir)/unix_time.c \ + $(srcdir)/util.c \ $(srcdir)/weak_key.c +LIB_SUBDIRS= . +LIBDONE= ./DONE + EXT_LIB= libdes425.a $(TOPLIBD)/libcrypto.a DEPKLIB= $(TOPLIBD)/libcrypto.a -all:: $(OBJS) +all:: all-$(WHAT) + +all-unix:: shared $(OBJS) +all-mac:: $(OBJS) +all-windows:: $(OBJS) + +shared: + mkdir shared verify: verify.o libdes425.a $(DEPKLIB) $(CC) -o $@ verify.o $(LDFLAGS) $(EXT_LIB) @@ -51,9 +67,15 @@ check-unix:: verify check-windows:: -clean:: +clean:: clean-$(WHAT) $(RM) verify$(EXEEXT) verify.$(OBJEXT) +clean-unix:: + $(RM) shared/* + +clean-mac:: +clean-windows:: + libdes425.a: $(OBJS) $(RM) $@ $(ARADD) $@ $(OBJS) diff --git a/src/lib/des425/configure.in b/src/lib/des425/configure.in index a37d5364d..4b268dad9 100644 --- a/src/lib/des425/configure.in +++ b/src/lib/des425/configure.in @@ -6,7 +6,10 @@ AC_PROG_ARCHIVE AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB AC_PROG_INSTALL +V5_SHARED_LIB_OBJS +SubdirLibraryRule([${OBJS}]) AppendRule([all:: libdes425.a]) +V5_MAKE_SHARED_LIB(libdes425) KRB_INCLUDE WITH_KRB5ROOT V5_AC_OUTPUT_MAKEFILE diff --git a/src/lib/des425/util.c b/src/lib/des425/util.c new file mode 100644 index 000000000..5b2019bd4 --- /dev/null +++ b/src/lib/des425/util.c @@ -0,0 +1,38 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1988 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * Miscellaneous debug printing utilities + */ + +#ifndef lint +static char rcsid_util_c[] = +"$Header$"; +#endif lint + +#include + +/* Application include files */ +#include "k5-int.h" +#include "des.h" + +des_cblock_print_file(x, fp) + des_cblock *x; + FILE *fp; +{ + unsigned char *y = (unsigned char *) x; + register int i = 0; + fprintf(fp," 0x { "); + + while (i++ < 8) { + fprintf(fp,"%x",*y++); + if (i < 8) + fprintf(fp,", "); + } + fprintf(fp," }"); +} -- 2.26.2