diff options
author | Simo Sorce <simo@redhat.com> | 2018-10-01 18:00:01 -0400 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-03-07 12:03:32 +0100 |
commit | 104c9dca3f963440e4f1d1170c9244682e700e28 (patch) | |
tree | e76fa82a434e0d9ffef553c3efac68fe8c6860be /ConfigureChecks.cmake | |
parent | c180211c6b804628d308743a51a0270873cf7c6f (diff) | |
download | libssh-104c9dca3f963440e4f1d1170c9244682e700e28.tar.gz libssh-104c9dca3f963440e4f1d1170c9244682e700e28.tar.xz libssh-104c9dca3f963440e4f1d1170c9244682e700e28.zip |
Use a common KDF function
Cleanup the KDF function to use only one function per crypto backend.
Improve the KDF function to properly handle requested lenght and to
avoid unnecessarily reallocating buffers.
In OpenSSL use the new EVP_KDF API if available.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 376ad7dd..643a0a4b 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -129,6 +129,10 @@ if (OPENSSL_FOUND) set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) + check_function_exists(EVP_KDF_CTX_new_id HAVE_OPENSSL_EVP_KDF_CTX_NEW_ID) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) check_function_exists(RAND_priv_bytes HAVE_OPENSSL_RAND_PRIV_BYTES) check_function_exists(OPENSSL_ia32cap_loc HAVE_OPENSSL_IA32CAP_LOC) |