projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9e3233
)
sha256: build with OpenSSL < 0.9.8 too
author
Douglas Mencken
<dougmencken@gmail.com>
Mon, 12 Feb 2018 11:19:56 +0000
(06:19 -0500)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 12 Feb 2018 13:16:37 +0000
(14:16 +0100)
support for SHA-2 was introduced in OpenSSL 0.9.8
Closes #2305
lib/sha256.c
patch
|
blob
|
history
diff --git
a/lib/sha256.c
b/lib/sha256.c
index cd81c0254158f4d7ba5982f5bd5b6440da01a164..776bd2846dcdae2489b3562334d3a418eb14cbd6 100644
(file)
--- a/
lib/sha256.c
+++ b/
lib/sha256.c
@@
-27,8
+27,20
@@
#include "warnless.h"
#include "curl_sha256.h"
+#define USE_OPENSSL_SHA256 0
+
#if defined(USE_OPENSSL)
+#include <openssl/opensslv.h>
+
+#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL)
+#define USE_OPENSSL_SHA256 1
+#endif
+
+#endif
+
+#if USE_OPENSSL_SHA256
+
/* When OpenSSL is available we use the SHA256-function from OpenSSL */
#include <openssl/sha.h>