]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
EVP_mdc2() portability hack.
authorHarlan Stenn <stenn@ntp.org>
Wed, 17 Oct 2001 05:19:23 +0000 (01:19 -0400)
committerHarlan Stenn <stenn@ntp.org>
Wed, 17 Oct 2001 05:19:23 +0000 (01:19 -0400)
portability improvement to genkey.c.

bk: 3bcd14db1Jgkx6UDPvPiV2xY011JIA

configure.in
util/genkeys.c

index bdd67f29daac88496aeda3260361cf1cdca83de0..1bfaeae4c2151e59d8a7d4b915df0fb6d308fb0a 100644 (file)
@@ -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
index a305fc4c07343af876bcd7526673f53182769aed..51a2649f9a25df5518810ce7caa4c07c0ccb8ab5 100644 (file)
@@ -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);