From 79416fb2d6d906210c93e6f5710cea201bdf6b0e Mon Sep 17 00:00:00 2001 From: John Malmberg Date: Wed, 1 Jul 2015 20:54:09 -0500 Subject: openssl: VMS support for SHA256 setup-vms.h: More symbols for SHA256, hacks for older VAX openssl.h: Use OpenSSL OPENSSL_NO_SHA256 macro to allow building on VAX. openssl.c: Use OpenSSL version checks and OPENSSL_NO_SHA256 macro to allow building on VAX and 64 bit VMS. --- lib/vtls/openssl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/vtls/openssl.c') diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index e41499f90..beebdc1b7 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -68,7 +68,7 @@ #include #endif -#ifndef HAVE_BORINGSSL +#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_IS_BORINGSSL) #include #endif @@ -136,8 +136,8 @@ #define CONF_modules_load_file(a,b,c) #endif -#ifdef OPENSSL_IS_BORINGSSL -/* not present in BoringSSL */ +#if (OPENSSL_VERSION_NUMBER < 0x0090808fL) || defined(OPENSSL_IS_BORINGSSL) +/* not present in BoringSSL or older OpenSSL */ #define OPENSSL_load_builtin_modules(x) #endif @@ -3183,6 +3183,7 @@ void Curl_ossl_md5sum(unsigned char *tmp, /* input */ MD5_Final(md5sum, &MD5pw); } +#ifndef OPENSSL_NO_SHA256 void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */ size_t tmplen, unsigned char *sha256sum /* output */, @@ -3194,6 +3195,7 @@ void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */ SHA256_Update(&SHA256pw, tmp, tmplen); SHA256_Final(sha256sum, &SHA256pw); } +#endif bool Curl_ossl_cert_status_request(void) { -- cgit v1.2.3