]> granicus.if.org Git - curl/commitdiff
openssl: build with < 0.9.8
authorDaniel Stenberg <daniel@haxx.se>
Thu, 17 Sep 2015 06:48:43 +0000 (08:48 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 17 Sep 2015 06:54:04 +0000 (08:54 +0200)
... without sha256 support and no define saying so.

Reported-by: Rajkumar Mandal
lib/vtls/openssl.c
lib/vtls/openssl.h

index 8600c61846b192a724894d93f463f7ebbdef31b1..71ce331ef94276747cbc195aaddddf3de075d331 100644 (file)
@@ -3185,7 +3185,7 @@ void Curl_ossl_md5sum(unsigned char *tmp, /* input */
   MD5_Final(md5sum, &MD5pw);
 }
 
-#ifndef OPENSSL_NO_SHA256
+#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256)
 void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */
                       size_t tmplen,
                       unsigned char *sha256sum /* output */,
index a1f347a0597467b46a0f8564533bf571eaf2a7b3..27738cc30151fc1ee231c00e99b95b1c34c0b405 100644 (file)
@@ -108,7 +108,7 @@ bool Curl_ossl_cert_status_request(void);
 #define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y)
 #define curlssl_random(x,y,z) Curl_ossl_random(x,y,z)
 #define curlssl_md5sum(a,b,c,d) Curl_ossl_md5sum(a,b,c,d)
-#ifndef OPENSSL_NO_SHA256
+#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256)
 #define curlssl_sha256sum(a,b,c,d) Curl_ossl_sha256sum(a,b,c,d)
 #endif
 #define curlssl_cert_status_request() Curl_ossl_cert_status_request()