[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 167/256: vtls: switch to CURL_SHA256_DIGEST_LENGTH
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 167/256: vtls: switch to CURL_SHA256_DIGEST_LENGTH define |
Date: |
Fri, 06 Oct 2017 19:44:18 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 4bb80d532e73045b06d23228b3a501d9f7c93acf
Author: Daniel Stenberg <address@hidden>
AuthorDate: Wed Sep 6 09:32:02 2017 +0200
vtls: switch to CURL_SHA256_DIGEST_LENGTH define
... instead of the prefix-less version since WolfSSL 3.12 now uses an
enum with that name that causes build failures for us.
Fixes #1865
Closes #1867
Reported-by: Gisle Vanem
---
lib/vtls/darwinssl.c | 2 +-
lib/vtls/vtls.c | 7 ++++---
lib/vtls/vtls.h | 6 +++---
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c
index f00a10053..ab3224c50 100644
--- a/lib/vtls/darwinssl.c
+++ b/lib/vtls/darwinssl.c
@@ -2780,7 +2780,7 @@ static void Curl_darwinssl_sha256sum(const unsigned char
*tmp, /* input */
unsigned char *sha256sum, /* output */
size_t sha256len)
{
- assert(sha256len >= SHA256_DIGEST_LENGTH);
+ assert(sha256len >= CURL_SHA256_DIGEST_LENGTH);
(void)CC_SHA256(tmp, (CC_LONG)tmplen, sha256sum);
}
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index f15760342..a1a301e7f 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -815,13 +815,14 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data,
}
/* compute sha256sum of public key */
- sha256sumdigest = malloc(SHA256_DIGEST_LENGTH);
+ sha256sumdigest = malloc(CURL_SHA256_DIGEST_LENGTH);
if(!sha256sumdigest)
return CURLE_OUT_OF_MEMORY;
Curl_ssl->sha256sum(pubkey, pubkeylen,
- sha256sumdigest, SHA256_DIGEST_LENGTH);
+ sha256sumdigest, CURL_SHA256_DIGEST_LENGTH);
encode = Curl_base64_encode(data, (char *)sha256sumdigest,
- SHA256_DIGEST_LENGTH, &encoded, &encodedlen);
+ CURL_SHA256_DIGEST_LENGTH, &encoded,
+ &encodedlen);
Curl_safefree(sha256sumdigest);
if(encode)
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h
index 3c8e32104..f1a11ea58 100644
--- a/lib/vtls/vtls.h
+++ b/lib/vtls/vtls.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -116,8 +116,8 @@ CURLcode Curl_none_md5sum(unsigned char *input, size_t
inputlen,
#define MD5_DIGEST_LENGTH 16 /* fixed size */
#endif
-#ifndef SHA256_DIGEST_LENGTH
-#define SHA256_DIGEST_LENGTH 32 /* fixed size */
+#ifndef CURL_SHA256_DIGEST_LENGTH
+#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
#endif
/* see https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 90/256: version: add the CURL_VERSION_MULTI_SSL feature flag, (continued)
- [GNUnet-SVN] [gnurl] 90/256: version: add the CURL_VERSION_MULTI_SSL feature flag, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 100/256: HELP-US.md: "How to get started helping out in the curl project", gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 157/256: mime: implement encoders., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 133/256: mime: fix signed/unsigned conversions., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 140/256: examples/post-callback: stop returning one byte at a time, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 143/256: mime: use CURL_ZERO_TERMINATED in examples, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 46/256: request-target.d: mention added in 7.55.0, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 56/256: winbuild: fix embedded manifest option, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 236/256: connect: fix race condition with happy eyeballs timeout, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 44/256: makefile.m32: add support for libidn2, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 167/256: vtls: switch to CURL_SHA256_DIGEST_LENGTH define,
gnunet <=
- [GNUnet-SVN] [gnurl] 54/256: examples/threaded-ssl: mention that this is for openssl before 1.1, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 188/256: checksrc: detect and warn for multiple spaces, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 233/256: http: add custom empty headers to repeated requests, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 115/256: ossfuzz: moving towards the ideal integration, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 241/256: cookie: fix memory leak if path was set twice in header, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 49/256: test1453: Fixed <features>, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 204/256: curl: make str2udouble not return values on error, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 225/256: symbols-in-versions: fix CURLSSLSET_NO_BACKENDS entry, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 196/256: docs: clarify the CURLOPT_INTERLEAVE* options behavior, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 154/256: mime: unified to use the typedef'd mime structs everywhere, gnunet, 2017/10/06