From: Harlan Stenn Date: Wed, 17 Oct 2001 05:19:23 +0000 (-0400) Subject: EVP_mdc2() portability hack. X-Git-Tag: NTP_4_1_72~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d23be89842393009711d2aeb1259ab07be057ea1;p=thirdparty%2Fntp.git EVP_mdc2() portability hack. portability improvement to genkey.c. bk: 3bcd14db1Jgkx6UDPvPiV2xY011JIA --- diff --git a/configure.in b/configure.in index bdd67f29da..1bfaeae4c2 100644 --- a/configure.in +++ b/configure.in @@ -2388,6 +2388,7 @@ case "$ans" in LIBS="$LIBS -lcrypto" AC_DEFINE(OPENSSL, , [Use OpenSSL?]) AC_DEFINE(PUBKEY, , [Public key?]) + AC_CHECK_FUNCS(EVP_mdc2) fi ;; esac diff --git a/util/genkeys.c b/util/genkeys.c index a305fc4c07..51a2649f9a 100644 --- a/util/genkeys.c +++ b/util/genkeys.c @@ -27,7 +27,7 @@ #define PRIMELEN 512 /* length of DH prime */ #define MD5KEYS 16 /* number of MD5 keys generated */ #define PATH_MAX 255 /* max file name length */ -#define JAN_1970 2208988800UL /* NTP seconds at the epoch */ +#define JAN_1970 ULONG_CONST(2208988800) /* NTP seconds at the epoch */ #define YEAR ((long)60*60*24*365) /* one year in seconds */ /* * Prototypes @@ -174,7 +174,9 @@ main( x509("RSA_MD5", pkey, EVP_md5()); x509("RSA_SHA", pkey, EVP_sha()); x509("RSA_SHA1", pkey, EVP_sha1()); +#ifdef HAVE_EVP_MDC2 x509("RSA_MDC2", pkey, EVP_mdc2()); +#endif x509("RSA_RIPEMD160", pkey, EVP_ripemd160()); free(pkey);