mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
cmake: Only build libcrypto and libcrypto-compat when needed
This also fixes the gcrypt build.
Cherry-picked from 2f6a866373
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -124,8 +124,6 @@ set(libssh_SRCS
|
||||
kex.c
|
||||
known_hosts.c
|
||||
legacy.c
|
||||
libcrypto.c
|
||||
libcrypto-compat.c
|
||||
log.c
|
||||
match.c
|
||||
messages.c
|
||||
@@ -164,7 +162,11 @@ else (WITH_GCRYPT)
|
||||
set(libssh_SRCS
|
||||
${libssh_SRCS}
|
||||
pki_crypto.c
|
||||
libcrypto.c
|
||||
)
|
||||
if(OPENSSL_VERSION VERSION_LESS "1.1.0")
|
||||
set(libssh_SRCS ${libssh_SRCS} libcrypto-compat.c)
|
||||
endif()
|
||||
endif (WITH_GCRYPT)
|
||||
|
||||
if (WITH_SFTP)
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
|
||||
#include <string.h>
|
||||
#include <openssl/engine.h>
|
||||
#include "libcrypto-compat.h"
|
||||
@@ -317,7 +314,3 @@ int HMAC_CTX_reset(HMAC_CTX *ctx)
|
||||
HMAC_CTX_init(ctx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
typedef int iso_c_forbids_an_empty_source_file;
|
||||
#endif /* OPENSSL_VERSION_NUMBER */
|
||||
|
||||
Reference in New Issue
Block a user