summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/include
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-09-16 21:04:40 +0000
committernectar <nectar@FreeBSD.org>2002-09-16 21:04:40 +0000
commit8707f886593c300d83c76654e92ec76bcea9b858 (patch)
tree291ed09be4bd7c999ad1617a832aa3caae1cb274 /crypto/heimdal/include
parenta77dba08ca7d8ad2f2dcd653974ac66df78cfa49 (diff)
downloadFreeBSD-src-8707f886593c300d83c76654e92ec76bcea9b858.zip
FreeBSD-src-8707f886593c300d83c76654e92ec76bcea9b858.tar.gz
Import of Heimdal Kerberos from KTH repository circa 2002/09/16.
Diffstat (limited to 'crypto/heimdal/include')
-rw-r--r--crypto/heimdal/include/Makefile.am9
-rw-r--r--crypto/heimdal/include/Makefile.in28
-rw-r--r--crypto/heimdal/include/config.h.in57
-rw-r--r--crypto/heimdal/include/make_crypto.c95
4 files changed, 165 insertions, 24 deletions
diff --git a/crypto/heimdal/include/Makefile.am b/crypto/heimdal/include/Makefile.am
index fee2ac2..c283cd2 100644
--- a/crypto/heimdal/include/Makefile.am
+++ b/crypto/heimdal/include/Makefile.am
@@ -1,25 +1,30 @@
-# $Id: Makefile.am,v 1.32 2002/05/24 15:36:21 joda Exp $
+# $Id: Makefile.am,v 1.33 2002/09/10 19:59:25 joda Exp $
include $(top_srcdir)/Makefile.am.common
SUBDIRS = kadm5
-noinst_PROGRAMS = bits
+noinst_PROGRAMS = bits make_crypto
CHECK_LOCAL =
INCLUDES += -DHOST=\"$(CANONICAL_HOST)\"
include_HEADERS = krb5-types.h
+noinst_HEADERS = crypto-headers.h
krb5-types.h: bits$(EXEEXT)
./bits$(EXEEXT) krb5-types.h
+crypto-headers.h: make_crypto$(EXEEXT)
+ ./make_crypto$(EXEEXT) crypto-headers.h
+
CLEANFILES = \
asn1.h \
asn1_err.h \
base64.h \
com_err.h \
com_right.h \
+ crypto-headers.h\
der.h \
des.h \
editline.h \
diff --git a/crypto/heimdal/include/Makefile.in b/crypto/heimdal/include/Makefile.in
index 9fe6d81..1eed888 100644
--- a/crypto/heimdal/include/Makefile.in
+++ b/crypto/heimdal/include/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.32 2002/05/24 15:36:21 joda Exp $
+# $Id: Makefile.am,v 1.33 2002/09/10 19:59:25 joda Exp $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
@@ -204,10 +204,11 @@ NROFF_MAN = groff -mandoc -Tascii
SUBDIRS = kadm5
-noinst_PROGRAMS = bits
+noinst_PROGRAMS = bits make_crypto
CHECK_LOCAL =
include_HEADERS = krb5-types.h
+noinst_HEADERS = crypto-headers.h
CLEANFILES = \
asn1.h \
@@ -215,6 +216,7 @@ CLEANFILES = \
base64.h \
com_err.h \
com_right.h \
+ crypto-headers.h\
der.h \
des.h \
editline.h \
@@ -249,7 +251,7 @@ subdir = include
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
-noinst_PROGRAMS = bits$(EXEEXT)
+noinst_PROGRAMS = bits$(EXEEXT) make_crypto$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
bits_SOURCES = bits.c
@@ -257,6 +259,11 @@ bits_OBJECTS = bits.$(OBJEXT)
bits_LDADD = $(LDADD)
bits_DEPENDENCIES =
bits_LDFLAGS =
+make_crypto_SOURCES = make_crypto.c
+make_crypto_OBJECTS = make_crypto.$(OBJEXT)
+make_crypto_LDADD = $(LDADD)
+make_crypto_DEPENDENCIES =
+make_crypto_LDFLAGS =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
@@ -273,17 +280,18 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
-DIST_SOURCES = bits.c
-HEADERS = $(include_HEADERS)
+DIST_SOURCES = bits.c make_crypto.c
+HEADERS = $(include_HEADERS) $(noinst_HEADERS)
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = $(include_HEADERS) Makefile.am Makefile.in config.h.in
+DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) Makefile.am \
+ Makefile.in
DIST_SUBDIRS = $(SUBDIRS)
-SOURCES = bits.c
+SOURCES = bits.c make_crypto.c
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -322,6 +330,9 @@ clean-noinstPROGRAMS:
bits$(EXEEXT): $(bits_OBJECTS) $(bits_DEPENDENCIES)
@rm -f bits$(EXEEXT)
$(LINK) $(bits_LDFLAGS) $(bits_OBJECTS) $(bits_LDADD) $(LIBS)
+make_crypto$(EXEEXT): $(make_crypto_OBJECTS) $(make_crypto_DEPENDENCIES)
+ @rm -f make_crypto$(EXEEXT)
+ $(LINK) $(make_crypto_LDFLAGS) $(make_crypto_OBJECTS) $(make_crypto_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
@@ -731,6 +742,9 @@ install-data-local: install-cat-mans
krb5-types.h: bits$(EXEEXT)
./bits$(EXEEXT) krb5-types.h
+
+crypto-headers.h: make_crypto$(EXEEXT)
+ ./make_crypto$(EXEEXT) crypto-headers.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/crypto/heimdal/include/config.h.in b/crypto/heimdal/include/config.h.in
index 39fafbd..0dde992 100644
--- a/crypto/heimdal/include/config.h.in
+++ b/crypto/heimdal/include/config.h.in
@@ -285,6 +285,9 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* Define if you have the function `getopt'. */
#undef HAVE_GETOPT
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
/* Define to 1 if you have the `getprogname' function. */
#undef HAVE_GETPROGNAME
@@ -448,6 +451,9 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* Define to 1 if you have the `mktime' function. */
#undef HAVE_MKTIME
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
/* define if you have a ndbm library */
#undef HAVE_NDBM
@@ -457,6 +463,9 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
+/* Define to 1 if you have the <netgroup.h> header file. */
+#undef HAVE_NETGROUP_H
+
/* Define to 1 if you have the <netinet6/in6.h> header file. */
#undef HAVE_NETINET6_IN6_H
@@ -493,6 +502,9 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* Define if NDBM really is DB (creates files *.db) */
#undef HAVE_NEW_DB
+/* define if you have hash functions like md4_finito() */
+#undef HAVE_OLD_HASH_NAMES
+
/* Define to 1 if you have the `on_exit' function. */
#undef HAVE_ON_EXIT
@@ -559,6 +571,9 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* Define to 1 if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H
+/* Define to 1 if you have the `res_nsearch' function. */
+#undef HAVE_RES_NSEARCH
+
/* Define to 1 if you have the `res_search' function. */
#undef HAVE_RES_SEARCH
@@ -844,6 +859,9 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
@@ -1210,6 +1228,9 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* define if the system is missing a prototype for vsnprintf() */
#undef NEED_VSNPRINTF_PROTO
+/* Define if you don't want to use mmap. */
+#undef NO_MMAP
+
/* Define this to enable old environment option in telnet. */
#undef OLD_ENVIRON
@@ -1290,9 +1311,15 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
`char[]'. */
#undef YYTEXT_POINTER
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
/* Define to enable extensions on glibc-based systems such as Linux. */
#undef _GNU_SOURCE
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
@@ -1321,6 +1348,13 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
+#if defined(HAVE_FOUR_VALUED_KRB_PUT_INT) || !defined(KRB4)
+#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (L), (S))
+#else
+#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (S))
+#endif
+
+
#if defined(ENCRYPTION) && !defined(AUTHENTICATION)
#define AUTHENTICATION 1
@@ -1345,6 +1379,14 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
#include "roken_rename.h"
#endif
+#ifndef HAVE_KRB_KDCTIMEOFDAY
+#define krb_kdctimeofday(X) gettimeofday((X), NULL)
+#endif
+
+#ifndef HAVE_KRB_GET_KDC_TIME_DIFF
+#define krb_get_kdc_time_diff() (0)
+#endif
+
#ifdef VOID_RETSIGTYPE
#define SIGRETURN(x) return
#else
@@ -1356,21 +1398,6 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
#define isoc_realloc(X, Y) ((X) ? realloc((X), (Y)) : malloc(Y))
#endif
-#if defined(HAVE_FOUR_VALUED_KRB_PUT_INT) || !defined(KRB4)
-#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (L), (S))
-#else
-#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (S))
-#endif
-
-
-#ifndef HAVE_KRB_KDCTIMEOFDAY
-#define krb_kdctimeofday(X) gettimeofday((X), NULL)
-#endif
-
-#ifndef HAVE_KRB_GET_KDC_TIME_DIFF
-#define krb_get_kdc_time_diff() (0)
-#endif
-
#if ENDIANESS_IN_SYS_PARAM_H
# include <sys/types.h>
diff --git a/crypto/heimdal/include/make_crypto.c b/crypto/heimdal/include/make_crypto.c
new file mode 100644
index 0000000..d1b633c
--- /dev/null
+++ b/crypto/heimdal/include/make_crypto.c
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the Institute nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+RCSID("$Id");
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+int
+main(int argc, char **argv)
+{
+ char *p;
+ FILE *f;
+ if(argc != 2) {
+ fprintf(stderr, "Usage: make_crypto file\n");
+ exit(1);
+ }
+ f = fopen(argv[1], "w");
+ if(f == NULL) {
+ perror(argv[1]);
+ exit(1);
+ }
+ for(p = argv[1]; *p; p++)
+ if(!isalnum((int)*p))
+ *p = '_';
+ fprintf(f, "#ifndef __%s__\n", argv[1]);
+ fprintf(f, "#define __%s__\n", argv[1]);
+#ifdef HAVE_OPENSSL
+ fputs("#include <openssl/des.h>\n", f);
+ fputs("#include <openssl/rc4.h>\n", f);
+ fputs("#include <openssl/md4.h>\n", f);
+ fputs("#include <openssl/md5.h>\n", f);
+ fputs("#include <openssl/sha.h>\n", f);
+#else
+ fputs("#include <des.h>\n", f);
+ fputs("#include <md4.h>\n", f);
+ fputs("#include <md5.h>\n", f);
+ fputs("#include <sha.h>\n", f);
+ fputs("#include <rc4.h>\n", f);
+#ifdef HAVE_OLD_HASH_NAMES
+ fputs("\n", f);
+ fputs(" typedef struct md4 MD4_CTX;\n", f);
+ fputs("#define MD4_Init md4_init\n", f);
+ fputs("#define MD4_Update md4_update\n", f);
+ fputs("#define MD4_Final(D, C) md4_finito((C), (D))\n", f);
+ fputs("\n", f);
+ fputs(" typedef struct md5 MD5_CTX;\n", f);
+ fputs("#define MD5_Init md5_init\n", f);
+ fputs("#define MD5_Update md5_update\n", f);
+ fputs("#define MD5_Final(D, C) md5_finito((C), (D))\n", f);
+ fputs("\n", f);
+ fputs(" typedef struct sha SHA_CTX;\n", f);
+ fputs("#define SHA1_Init sha_init\n", f);
+ fputs("#define SHA1_Update sha_update\n", f);
+ fputs("#define SHA1_Final(D, C) sha_finito((C), (D))\n", f);
+#endif
+#endif
+ fprintf(f, "#endif /* __%s__ */\n", argv[1]);
+ fclose(f);
+ exit(0);
+}
OpenPOWER on IntegriCloud