diff options
-rw-r--r-- | lib/libkeynote/assertion.h | 17 | ||||
-rw-r--r-- | lib/libkeynote/auxil.c | 8 | ||||
-rw-r--r-- | lib/libkeynote/base64.c | 6 | ||||
-rw-r--r-- | lib/libkeynote/config.h | 19 | ||||
-rw-r--r-- | lib/libkeynote/config.hin | 21 | ||||
-rw-r--r-- | lib/libkeynote/configure | 542 | ||||
-rw-r--r-- | lib/libkeynote/configure.in | 18 | ||||
-rw-r--r-- | lib/libkeynote/environment.c | 16 |
8 files changed, 496 insertions, 151 deletions
diff --git a/lib/libkeynote/assertion.h b/lib/libkeynote/assertion.h index 90ea6427003..efb75623cdc 100644 --- a/lib/libkeynote/assertion.h +++ b/lib/libkeynote/assertion.h @@ -1,4 +1,4 @@ -/* $OpenBSD: assertion.h,v 1.2 1999/05/31 20:09:58 angelos Exp $ */ +/* $OpenBSD: assertion.h,v 1.3 2000/10/03 01:33:55 angelos Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu) * @@ -74,8 +74,8 @@ struct assertion int as_signeralgorithm; int as_result; int as_error; - u_char as_flags; - u_char as_internalflags; + unsigned char as_flags; + unsigned char as_internalflags; char as_kresult; char as_sigresult; struct keylist *as_keylist; @@ -135,15 +135,16 @@ extern int keynote_errno; extern int knlineno; /* Function prototypes */ -extern int keynote_env_add(char *, char *, struct environment **, u_int, int); -extern char *keynote_env_lookup(char *, struct environment **, u_int); -extern int keynote_env_delete(char *, struct environment **, u_int); +extern int keynote_env_add(char *, char *, struct environment **, + unsigned int, int); +extern char *keynote_env_lookup(char *, struct environment **, unsigned int); +extern int keynote_env_delete(char *, struct environment **, unsigned int); extern struct keylist *keynote_keylist_find(struct keylist *, char *); extern struct environment *keynote_get_envlist(char *, char *, int); extern struct assertion *keynote_parse_assertion(char *, int, int); extern int keynote_evaluate_authorizer(struct assertion *, int); extern struct assertion *keynote_find_assertion(void *, int, int); -extern void keynote_env_cleanup(struct environment **, u_int); +extern void keynote_env_cleanup(struct environment **, unsigned int); extern int keynote_get_key_algorithm(char *, int *, int *); extern int keynote_sigverify_assertion(struct assertion *); extern int keynote_evaluate_assertion(struct assertion *); @@ -157,7 +158,7 @@ extern void keynote_keylist_free(struct keylist *); extern void keynote_free_env(struct environment *); extern int keynote_in_authorizers(void *, int); extern int keynote_sremove_assertion(int, int); -extern u_int keynote_stringhash(char *, u_int); +extern unsigned int keynote_stringhash(char *, unsigned int); extern char *keynote_get_private_key(char *); extern void keynote_free_key(void *, int); extern int keynote_evaluate_query(void); diff --git a/lib/libkeynote/auxil.c b/lib/libkeynote/auxil.c index 921502870fe..2e9006f405a 100644 --- a/lib/libkeynote/auxil.c +++ b/lib/libkeynote/auxil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auxil.c,v 1.4 2000/05/17 05:38:18 angelos Exp $ */ +/* $OpenBSD: auxil.c,v 1.5 2000/10/03 01:33:55 angelos Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu) * @@ -343,7 +343,7 @@ int keynote_add_htable(struct assertion *as, int which) { char *hashname; - u_int i; + unsigned int i; if (as == (struct assertion *) NULL) { @@ -515,8 +515,8 @@ keynote_free_assertion(struct assertion *as) free(as); } -u_int -keynote_stringhash(char *name, u_int size) +unsigned int +keynote_stringhash(char *name, unsigned int size) { unsigned int hash_val = 0; unsigned int i; diff --git a/lib/libkeynote/base64.c b/lib/libkeynote/base64.c index 2abd279242a..cd0ef31ad93 100644 --- a/lib/libkeynote/base64.c +++ b/lib/libkeynote/base64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: base64.c,v 1.7 2000/06/13 19:16:15 angelos Exp $ */ +/* $OpenBSD: base64.c,v 1.8 2000/10/03 01:33:55 angelos Exp $ */ /* * Copyright (c) 1996 by Internet Software Consortium. * @@ -61,8 +61,8 @@ #include "keynote.h" #if defined(HAVE___B64_NTOP) -int __b64_ntop __P((u_char const *, size_t, char *, size_t)); -int __b64_pton __P((char const *, u_char *, size_t)); +int __b64_ntop __P((unsigned char const *, size_t, char *, size_t)); +int __b64_pton __P((char const *, unsigned char *, size_t)); int kn_encode_base64(src, srclength, target, targsize) diff --git a/lib/libkeynote/config.h b/lib/libkeynote/config.h index df0ee300595..56a9c3adcf6 100644 --- a/lib/libkeynote/config.h +++ b/lib/libkeynote/config.h @@ -1,4 +1,5 @@ /* config.h. Generated automatically by configure. */ +/* $OpenBSD: config.h,v 1.2 2000/10/03 01:33:55 angelos Exp $ */ /* config.hin. Generated automatically from configure.in by autoheader. */ /* Define to empty if the keyword does not work. */ @@ -10,6 +11,9 @@ /* Define if you can safely include both <sys/time.h> and <time.h>. */ #define TIME_WITH_SYS_TIME 1 +/* Define if you have the __b64_ntop function. */ +#define HAVE___B64_NTOP 1 + /* Define if you have the _close function. */ /* #undef HAVE__CLOSE */ @@ -19,9 +23,6 @@ /* Define if you have the _read function. */ /* #undef HAVE__READ */ -/* Define if you have the b64_ntop function. */ -#define HAVE___B64_NTOP 1 - /* Define if you have the close function. */ #define HAVE_CLOSE 1 @@ -58,6 +59,9 @@ /* Define if you have the strnicmp function. */ /* #undef HAVE_STRNICMP */ +/* Define if you have the <crypto.h> header file. */ +/* #undef HAVE_CRYPTO_H */ + /* Define if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 @@ -73,6 +77,9 @@ /* Define if you have the <openssl/crypto.h> header file. */ #define HAVE_OPENSSL_CRYPTO_H 1 +/* Define if you have the <pgplib.h> header file. */ +/* #undef HAVE_PGPLIB_H */ + /* Define if you have the <regex.h> header file. */ #define HAVE_REGEX_H 1 @@ -84,9 +91,3 @@ /* Define if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 - -/* Define if you have the crypto library (-lcrypto). */ -#define HAVE_LIBCRYPTO 1 - -/* Define if you have /dev/urandom file. */ -#define HAVE__DEV_URANDOM 1 diff --git a/lib/libkeynote/config.hin b/lib/libkeynote/config.hin index 9caa3e47ac3..335d756752c 100644 --- a/lib/libkeynote/config.hin +++ b/lib/libkeynote/config.hin @@ -1,5 +1,4 @@ -/* $OpenBSD: config.hin,v 1.3 2000/09/26 23:28:45 angelos Exp $ */ - +/* $OpenBSD: config.hin,v 1.4 2000/10/03 01:33:55 angelos Exp $ */ /* config.hin. Generated automatically from configure.in by autoheader. */ /* Define to empty if the keyword does not work. */ @@ -11,6 +10,9 @@ /* Define if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME +/* Define if you have the __b64_ntop function. */ +#undef HAVE___B64_NTOP + /* Define if you have the _close function. */ #undef HAVE__CLOSE @@ -20,15 +22,9 @@ /* Define if you have the _read function. */ #undef HAVE__READ -/* Define if you have the b64_ntop function. */ -#undef HAVE___B64_NTOP - /* Define if you have the close function. */ #undef HAVE_CLOSE -/* Define if you have the <crypto.h> header file. */ -#undef HAVE_CRYPTO_H - /* Define if you have the getopt function. */ #undef HAVE_GETOPT @@ -62,6 +58,9 @@ /* Define if you have the strnicmp function. */ #undef HAVE_STRNICMP +/* Define if you have the <crypto.h> header file. */ +#undef HAVE_CRYPTO_H + /* Define if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -77,6 +76,9 @@ /* Define if you have the <openssl/crypto.h> header file. */ #undef HAVE_OPENSSL_CRYPTO_H +/* Define if you have the <pgplib.h> header file. */ +#undef HAVE_PGPLIB_H + /* Define if you have the <regex.h> header file. */ #undef HAVE_REGEX_H @@ -88,6 +90,3 @@ /* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H - -/* Define if you have the crypto library (-lcrypto). */ -#undef HAVE_LIBCRYPTO diff --git a/lib/libkeynote/configure b/lib/libkeynote/configure index 170e50b33ca..ad15b0aa0e4 100644 --- a/lib/libkeynote/configure +++ b/lib/libkeynote/configure @@ -1,5 +1,5 @@ #! /bin/sh -# $OpenBSD: configure,v 1.3 2000/09/26 23:28:45 angelos Exp $ +# $OpenBSD: configure,v 1.4 2000/10/03 01:33:55 angelos Exp $ # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -1420,13 +1420,53 @@ else echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking for pgpCipherByName in -lpgp""... $ac_c" 1>&6 +echo "configure:1424: checking for pgpCipherByName in -lpgp" >&5 +ac_lib_var=`echo pgp'_'pgpCipherByName | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpgp $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1432 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pgpCipherByName(); + +int main() { +pgpCipherByName() +; return 0; } +EOF +if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lpgp" +else + echo "$ac_t""no" 1>&6 +fi + CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\ -I/usr/local/ssl/include -I/usr/openssl/include -I/usr/pkg/include\ -I/usr/local/openssl/include -I/pkg/include" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1429: checking how to run the C preprocessor" >&5 +echo "configure:1469: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1441,13 +1481,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1444 "configure" +#line 1484 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1458,13 +1498,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1461 "configure" +#line 1501 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1475,13 +1515,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1478 "configure" +#line 1518 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1506,12 +1546,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1509: checking for ANSI C header files" >&5 +echo "configure:1549: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1514 "configure" +#line 1554 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1519,7 +1559,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1536,7 +1576,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1539 "configure" +#line 1579 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1554,7 +1594,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1557 "configure" +#line 1597 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1575,7 +1615,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 1578 "configure" +#line 1618 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1586,7 +1626,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1610,12 +1650,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1613: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1653: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1618 "configure" +#line 1658 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -1624,7 +1664,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1644,21 +1684,21 @@ EOF fi -for ac_hdr in fcntl.h limits.h unistd.h regex.h sys/time.h io.h +for ac_hdr in fcntl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1651: checking for $ac_hdr" >&5 +echo "configure:1691: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1656 "configure" +#line 1696 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1684,21 +1724,381 @@ else fi done -for ac_hdr in ssl/crypto.h openssl/crypto.h crypto.h memory.h +for ac_hdr in limits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1691: checking for $ac_hdr" >&5 +echo "configure:1731: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1696 "configure" +#line 1736 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1771: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1776 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in regex.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1811: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1816 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in sys/time.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1851: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1856 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in io.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1891: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1896 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in ssl/crypto.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1931: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1936 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in openssl/crypto.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1971: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1976 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in crypto.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2011: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2016 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in memory.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2051: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2056 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in pgplib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2091: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2096 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1727,12 +2127,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1730: checking for working const" >&5 +echo "configure:2130: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1735 "configure" +#line 2135 "configure" #include "confdefs.h" int main() { @@ -1781,7 +2181,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1801,82 +2201,16 @@ EOF fi -echo $ac_n "checking for u_int""... $ac_c" 1>&6 -echo "configure:1805: checking for u_int" >&5 -if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1810 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#include <stddef.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])u_int[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_u_int=yes -else - rm -rf conftest* - ac_cv_type_u_int=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_u_int" 1>&6 -if test $ac_cv_type_u_int = no; then - cat >> confdefs.h <<\EOF -#define u_int unsigned int -EOF - -fi - -echo $ac_n "checking for u_char""... $ac_c" 1>&6 -echo "configure:1838: checking for u_char" >&5 -if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1843 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#include <stddef.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])u_char[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_u_char=yes -else - rm -rf conftest* - ac_cv_type_u_char=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_u_char" 1>&6 -if test $ac_cv_type_u_char = no; then - cat >> confdefs.h <<\EOF -#define u_char unsigned char -EOF - -fi - for ac_func in regcomp open close read _open _close _read strchr memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1874: checking for $ac_func" >&5 +echo "configure:2208: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1879 "configure" +#line 2213 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1899,7 +2233,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1926,12 +2260,12 @@ done for ac_func in strcasecmp strncasecmp stricmp strnicmp snprintf __b64_ntop do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1929: checking for $ac_func" >&5 +echo "configure:2263: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1934 "configure" +#line 2268 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1954,7 +2288,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1981,12 +2315,12 @@ done for ac_func in getopt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1984: checking for $ac_func" >&5 +echo "configure:2318: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1989 "configure" +#line 2323 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2009,7 +2343,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/lib/libkeynote/configure.in b/lib/libkeynote/configure.in index 9ad14b5a68d..d02804c8423 100644 --- a/lib/libkeynote/configure.in +++ b/lib/libkeynote/configure.in @@ -1,4 +1,4 @@ -dnl $OpenBSD: configure.in,v 1.3 2000/09/26 23:28:45 angelos Exp $ +dnl $OpenBSD: configure.in,v 1.4 2000/10/03 01:33:56 angelos Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(assertion.h) @@ -30,6 +30,7 @@ AC_CHECK_LIB(m, floor, LIBS="$LIBS -lm") AC_CHECK_LIB(rsaref, RSAPrivateDecrypt, LIBS="$LIBS -lrsaref") AC_CHECK_LIB(crypto, i2a_ASN1_STRING, LIBS="$LIBS -lcrypto") AC_CHECK_LIB(RSAglue, RSA_ref_private_encrypt, LIBS="$LIBS -lRSAglue") +AC_CHECK_LIB(pgp, pgpCipherByName, LIBS="$LIBS -lpgp") dnl Checks for header files. CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\ @@ -38,15 +39,22 @@ CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\ AC_HEADER_STDC AC_HEADER_TIME -AC_CHECK_HEADERS(fcntl.h limits.h unistd.h regex.h sys/time.h io.h) -AC_CHECK_HEADERS(ssl/crypto.h openssl/crypto.h crypto.h memory.h) +AC_CHECK_HEADERS(fcntl.h) +AC_CHECK_HEADERS(limits.h) +AC_CHECK_HEADERS(unistd.h) +AC_CHECK_HEADERS(regex.h) +AC_CHECK_HEADERS(sys/time.h) +AC_CHECK_HEADERS(io.h) +AC_CHECK_HEADERS(ssl/crypto.h) +AC_CHECK_HEADERS(openssl/crypto.h) +AC_CHECK_HEADERS(crypto.h) +AC_CHECK_HEADERS(memory.h) +AC_CHECK_HEADERS(pgplib.h) dnl Checks for other files dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -AC_CHECK_TYPE(u_int, unsigned int) -AC_CHECK_TYPE(u_char, unsigned char) dnl Checks for library functions. AC_CHECK_FUNCS(regcomp open close read _open _close _read strchr memcpy) diff --git a/lib/libkeynote/environment.c b/lib/libkeynote/environment.c index 3fd90af4bc9..e77573506b6 100644 --- a/lib/libkeynote/environment.c +++ b/lib/libkeynote/environment.c @@ -1,4 +1,4 @@ -/* $OpenBSD: environment.c,v 1.14 2000/09/27 00:09:54 angelos Exp $ */ +/* $OpenBSD: environment.c,v 1.15 2000/10/03 01:33:56 angelos Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu) * @@ -209,7 +209,8 @@ keynote_free_env(struct environment *en) * argument specifies case-insensitivity. */ char * -keynote_env_lookup(char *name, struct environment **table, u_int hashsize) +keynote_env_lookup(char *name, struct environment **table, + unsigned int hashsize) { struct environment *en; @@ -235,10 +236,11 @@ keynote_env_lookup(char *name, struct environment **table, u_int hashsize) * successful, and RESULT_FALSE if the variable was not found. */ int -keynote_env_delete(char *name, struct environment **table, u_int hashsize) +keynote_env_delete(char *name, struct environment **table, + unsigned int hashsize) { struct environment *en, *en2; - u_int h; + unsigned int h; h = keynote_stringhash(name, hashsize); @@ -274,10 +276,10 @@ keynote_env_delete(char *name, struct environment **table, u_int hashsize) */ int keynote_env_add(char *name, char *value, struct environment **table, - u_int hashsize, int flags) + unsigned int hashsize, int flags) { struct environment *en; - u_int h, i; + unsigned int h, i; en = calloc(1, sizeof(struct environment)); if (en == (struct environment *) NULL) @@ -344,7 +346,7 @@ keynote_env_add(char *name, char *value, struct environment **table, * Cleanup an environment table. */ void -keynote_env_cleanup(struct environment **table, u_int hashsize) +keynote_env_cleanup(struct environment **table, unsigned int hashsize) { struct environment *en2; |