cmake: Only build libcrypto and libcrypto-compat when needed
This also fixes the gcrypt build. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
f8ef200e76
Коммит
2f6a866373
@ -125,8 +125,6 @@ set(libssh_SRCS
|
|||||||
kex.c
|
kex.c
|
||||||
known_hosts.c
|
known_hosts.c
|
||||||
legacy.c
|
legacy.c
|
||||||
libcrypto.c
|
|
||||||
libcrypto-compat.c
|
|
||||||
log.c
|
log.c
|
||||||
match.c
|
match.c
|
||||||
messages.c
|
messages.c
|
||||||
@ -167,7 +165,11 @@ else (WITH_GCRYPT)
|
|||||||
${libssh_SRCS}
|
${libssh_SRCS}
|
||||||
pki_crypto.c
|
pki_crypto.c
|
||||||
ecdh_crypto.c
|
ecdh_crypto.c
|
||||||
|
libcrypto.c
|
||||||
)
|
)
|
||||||
|
if(OPENSSL_VERSION VERSION_LESS "1.1.0")
|
||||||
|
set(libssh_SRCS ${libssh_SRCS} libcrypto-compat.c)
|
||||||
|
endif()
|
||||||
endif (WITH_GCRYPT)
|
endif (WITH_GCRYPT)
|
||||||
|
|
||||||
if (WITH_SFTP)
|
if (WITH_SFTP)
|
||||||
|
@ -7,9 +7,6 @@
|
|||||||
* https://www.openssl.org/source/license.html
|
* https://www.openssl.org/source/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslv.h>
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
#include "libcrypto-compat.h"
|
#include "libcrypto-compat.h"
|
||||||
@ -329,7 +326,3 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
|
|||||||
EVP_CIPHER_CTX_init(ctx);
|
EVP_CIPHER_CTX_init(ctx);
|
||||||
OPENSSL_free(ctx);
|
OPENSSL_free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
typedef int iso_c_forbids_an_empty_source_file;
|
|
||||||
#endif /* OPENSSL_VERSION_NUMBER */
|
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user