Tobias Heider 8e316164a8
Support libcrypto for hmac and sha256 (#223)
* compat: Add OpenSSL libcrypto compatibility layer

Detect libcrypto in configure script.  Only fall back
to using libcrypto when /usr libs are allowed and no
other compatible implementation is available or when
--with-openssl is passed explicitly.
Make sure libcrypto and libmd are never linked at the
same time.

Add OpenSSL based SHA256 and HMAC compat shims in
compat/crypt_openssl. Depeding on version and build flags,
libcrypto ships with a compatible SHA256 API in
"openssl/sha.h".  OpenSSL 3 has deprecated the SHA API,
so if it is not detected we fall back to an EVP_DIGEST
based version.
Because the API might still be in use in OpenSSL internally,
the compatibility wrappers have a dhcpcd_ prefix to avoid
symbol conflicts.

* Add sha256 tests based on the existing hmac-md5 tests.
2023-09-25 09:49:00 +01:00
..
2017-04-13 14:50:58 +01:00
2017-04-13 14:50:58 +01:00
2018-01-01 11:17:24 +00:00

dhcpcd Test Suite

Currently this just tests the RFC2202 MD5 implementation in dhcpcd. This is important, because dhcpcd will either use the system MD5 implementation if found, otherwise some compat code.

This test suit ensures that it works in accordance with known standards on your platform.