Skip to content

Commit

Permalink
digest_auth: fix Makefile detection of SHA256 and SHA512t256
Browse files Browse the repository at this point in the history
(cherry picked from commit 3c11d3c)
(cherry picked from commit d92607f)
(cherry picked from commit d1c8a47)
(cherry picked from commit 8fccc49)
  • Loading branch information
razvancrainea committed Sep 21, 2023
1 parent b8dbe9e commit 358051e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/digest_auth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ LIBS=

CPP_CMD?=cpp

SHA_256_SUPPORT:= $(shell printf '\#define SHA256_Init(x) \
_TEST_P_A_S_S_E_D_()\n\#include <openssl/sha.h>\n' \
SHA_256_SUPPORT:= $(shell bash -c "echo -e '\x23define SHA256_Init(x) \
_TEST_P_A_S_S_E_D_()\n\x23include <openssl/sha.h>\n'" \
| $(CPP_CMD) $(DEFS) 2>/dev/null | grep -q _TEST_P_A_S_S_E_D_ && echo yes)

SHA_512_256_SUPPORT:= $(shell printf '\#define EVP_sha512_256(x) \
_TEST_P_A_S_S_E_D_()\n\#include <openssl/evp.h>\n' \
SHA_512_256_SUPPORT:= $(shell bash -c "echo -e '\x23define EVP_sha512_256(x) \
_TEST_P_A_S_S_E_D_()\n\x23include <openssl/evp.h>\n'" \
| $(CPP_CMD) $(DEFS) 2>/dev/null | grep -q _TEST_P_A_S_S_E_D_ && echo yes)

ifeq ($(SHA_256_SUPPORT),yes)
Expand Down

0 comments on commit 358051e

Please sign in to comment.