cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: make is failing when configured with ssl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 17 Sep 2015 00:28:29 +0200 (CEST)

On Wed, 16 Sep 2015, rajkumar mandal wrote:

> My make command is failing when configured with ssl, can anyone help

...

> vtls/openssl.c:3192: error: `SHA256_CTX' undeclared (first use in this
> function)

This is a very old OpenSSL version, right?

Try this patch:

diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 8600c61..71ce331 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -3183,11 +3183,11 @@ void Curl_ossl_md5sum(unsigned char *tmp, /* input */
    MD5_Init(&MD5pw);
    MD5_Update(&MD5pw, tmp, tmplen);
    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 */,
                        size_t unused)
  {

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-09-17