mirror of
https://github.com/curl/curl.git
synced 2026-08-15 01:13:37 +03:00
sha256: build with OpenSSL < 0.9.8 too
support for SHA-2 was introduced in OpenSSL 0.9.8 Closes #2305
This commit is contained in:
parent
b9e323334d
commit
50c0033a6c
1 changed files with 12 additions and 0 deletions
12
lib/sha256.c
12
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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue