wolfSSL / wolfEngine

wolfCrypt and wolfCrypt FIPS engine for OpenSSL
https://www.wolfssl.com
GNU General Public License v3.0
23 stars 26 forks source link

Support -1 HMAC key length #200

Closed cconlon closed 1 year ago

cconlon commented 1 year ago

This PR adds support for OpenSSL HMAC callers to use -1 as the key length. OpenSSL allows this, and expects engine implementations to use strlen() on the provided key to get the length in this case.

Edge case detected by a customer when running the following OpenSSL command line application call:

echo -ne "TEST_MESSAGE" | openssl sha256 -hmac "TestKeyStringHere"

This PR also adds HMAC unit tests for -1 cases and updates the README.md with a note about the WOLFENGINE_OPENSSL_INSTALL environment variable for commit tests.