Skip to content

Commit

Permalink
fix build with libressl
Browse files Browse the repository at this point in the history
Fix the following build failure with libressl raised since
e61acb8:

utils.c:(.text+0x1614): undefined reference to `EVP_sha512_256'

Fixes:
 - http://autobuild.buildroot.org/results/cb18f6533806f3729f9718bdcc719384be375b66

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  • Loading branch information
ffontaine authored and Flole998 committed Apr 6, 2022
1 parent 90ba8b1 commit ea65f80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ http_send_header(http_connection_t *hc, int rc, const char *content,
http_auth_header(&hdrs, realm,
config.http_auth_algo == HTTP_AUTH_ALGO_SHA256 ?
"SHA-256" :
#if OPENSSL_VERSION_NUMBER >= 0x1010101fL
#if OPENSSL_VERSION_NUMBER >= 0x1010101fL && !defined(LIBRESSL_VERSION_NUMBER)
"SHA-512-256",
#else
"SHA-256",
Expand Down
2 changes: 1 addition & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ sha256sum ( const char *str, int lowercase )
char *
sha512sum256 ( const char *str, int lowercase )
{
#if OPENSSL_VERSION_NUMBER >= 0x1010101fL
#if OPENSSL_VERSION_NUMBER >= 0x1010101fL && !defined(LIBRESSL_VERSION_NUMBER)
return openssl_hash_hexstr(str, lowercase, EVP_sha512_256(), 32);
#else
return NULL;
Expand Down

0 comments on commit ea65f80

Please sign in to comment.