1
1
Граф коммитов

125 Коммитов

Автор SHA1 Сообщение Дата
Jakub Jelen
032f486f27 cmake: Link against gpg-error
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-09 13:05:38 +02:00
Andreas Schneider
f09ca85ebf cmake: Always build position independent code
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-02 14:48:02 +02:00
Andreas Schneider
e57f0273a6 cmake: Add UndefinedSanitizer
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-26 16:54:31 +02:00
Anderson Toshiyuki Sasaki
667fb5f9a9 cmake: Rewritten AddCMockaTest.cmake
This changes add_cmocka_test() to receive compiler options, the
libraries to be linked to the test, and the linker options.  The way the
tests are declared in tests/unittests and tests/client were updated.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-26 16:27:22 +02:00
Andreas Schneider
91800eb243 cmake: Move CompilerFlags to own file
They need to be included before the project() call.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 15:28:29 +02:00
Andreas Schneider
2923ad59f9 cmake: Update defaults
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 15:21:34 +02:00
Andreas Schneider
492e3d5c77 cmake: Store Profiling and AddressSanitizer flags in the cache
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 15:00:53 +02:00
Andreas Schneider
baa434ebed cmake: Small improvements to AddCMockaTest
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-02 11:25:43 +02:00
Andreas Schneider
aba6e34b63 cmake: Fix SSP compiler flag check
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29 21:21:17 +02:00
Anderson Toshiyuki Sasaki
2aeee5194c cmake: Fix target to make sure copy runs in the end
The target created to copy the file must be the one make dist is
depending on.  Otherwise it will not copy the generated files to the
desired path.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29 19:04:44 +02:00
Anderson Toshiyuki Sasaki
ca925588b0 cmake: Fix extract_symbols COPY_TO
Moved the symbols list formatting to the ExtractSymbols.cmake.  The
resulting list of symbols is sorted and printed in a more readable way
(one symbol per line).  Fixed the script to copy the generated symbols.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29 19:04:44 +02:00
Andreas Schneider
2291c75ab0 cmake: Detect abimap version
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29 18:08:59 +02:00
Anderson Toshiyuki Sasaki
f49bb1b6a3 cmake: Fix FindABIMap targets
Fix the targets and output files handling to make the symbols to be
updated correctly when a symbol is added or removed.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-27 14:42:56 +02:00
Andreas Schneider
47bf099c36 cmake: Add header to AddCCompilerFlag.cmake 2018-08-23 22:33:29 +02:00
Andreas Schneider
f8435e261c cmake: Disable include_guard as oss-fuzz's cmake version is too old
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-22 12:12:06 +02:00
Andreas Schneider
19e081aedb cmake: Remove obsolete UseDoxygen.cmake
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-22 09:08:39 +02:00
Andreas Schneider
9820a35a9e cmake: Remove obsolete DefineCompilerFlags.cmake
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-22 08:54:59 +02:00
Andreas Schneider
a9a99fb31f cmake: Improve compiler flag detection
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Andreas Schneider
99a9cf0fcb cmake: Respect CMAKE_REQUIRED_* variables in CHECK_C_COMPILER_FLAG_SSP
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Andreas Schneider
f65882cca6 cmake: Fix optional ABIMap detection
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2018-08-14 15:54:55 +02:00
Andreas Schneider
0656f8a43d cmake: Improve NSIS detection on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 21:48:48 +02:00
Anderson Toshiyuki Sasaki
efc427fdce cmake: Introduce symbol versioning
This adds a cmake module, FindABIMap, which looks for abimap and
provides functions to generate a symbol version linker script.

The module can be included using find_package(ABIMap).

This also adds the option to compile with symbol versioning.  The symbol
list is obtained from the header files by filtering those marked with
the LIBSSH_API modifier.

Such symbols are used as input to generate the version script used by
the linker.  The version script is automatically updated as new symbols
marked with LIBSSH_API are added to the header files.

If any symbol is removed, the build will fail due to break in the ABI.

Symbol versioning is enabled by default if abimap has been found. It is
disabled in non-UNIX platforms. It can be disabled by passing
"-DWITH_SYMBOL_VERSIONING=OFF" option to cmake.

Pair-Programmed-With: Andreas Schneider <asn@cryptomilk.org>

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 20:58:23 +02:00
Andreas Schneider
d90b88588f gitlab-ci: Add 32bit build on openSUSE
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-30 15:39:27 +02:00
Anderson Toshiyuki Sasaki
cd3170fcb1 gitlab: Use wine to run tests built for Windows
When building in a cross-compiling environment, use wine to run the
tests.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-27 21:23:12 +02:00
Anderson Toshiyuki Sasaki
9eaf55898e cmake: Added executable exension on test binaries
This is necessary when building the tests for Windows.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-27 21:20:26 +02:00
Andreas Schneider
6026fc8036 cmake: Fix libfuzzer linking with clang6
This is always available using -fsanitize=fuzzer now.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-04-10 11:13:57 +02:00
Andreas Schneider
25ff1214a4 cmake: Build ssh_server_fuzzer if enabled
Fixes T67

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-04 11:52:45 +01:00
Juraj Vijtiuk
778652460f add mbedtls crypto support
Summary:
This patch adds support for mbedTLS as a crypto backend for libssh.
mbedTLS is an SSL/TLS library that has been designed to mainly be used
in embedded systems.  It is loosely coupled and has a low memory
footprint.  mbedTLS also provides a cryptography library (libmbedcrypto)
that can be used without the TLS modules.
The patch is unfortunately quite big, since several new files had to
be added.
DSA is disabled at compile time, since mbedTLS doesn't support DSA
Patch review and feedback would be appreciated, and if any issues or
suggestions appear, I'm willing to work on them.

Signed-off-by: Juraj Vijtiuk <juraj.vijtiuk@sartura.hr>

Test Plan:
* The patch has been tested with a Debug and MinSizeRel build, with
libssh unit tests, client tests and the pkd tests.
* All the tests have been run with valgrind's memcheck, drd and helgrind
tools.
* The examples/samplessh client works when built with the patch.

Reviewers: asn, aris

Subscribers: simonsj

Differential Revision: https://bugs.libssh.org/D1
2017-12-28 11:17:39 +01:00
Andreas Schneider
d3834f69bc cmake: Fix parsing the gcrypt version
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-12 10:16:23 +02:00
Andreas Schneider
462c7726c3 cmake: Fix GCRYPT_ROOT_DIR and check correct paths
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-04-11 09:42:53 +02:00
Andreas Schneider
2384236849 cmake: Try to fix FindArgp module
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-17 10:42:52 +01:00
Aris Adamantiadis
7c2db045a8 cmake: detect MIT gssapi shim on osx 2016-03-14 22:27:38 +01:00
Andreas Schneider
fe8fcb805c cmake: Add support for Address Sanitizer
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 15:25:17 +02:00
Andreas Schneider
6c7e552509 cmake: Require cmake version 2.8.0 2015-04-10 13:32:09 +02:00
Andreas Schneider
01311dd419 cmake: Fix doxygen. 2014-04-10 08:54:10 +02:00
Andreas Schneider
0cb9f792b8 cmake: Update doxygen module. 2014-04-09 11:21:29 +02:00
Andreas Schneider
437a39c798 cmake: Enable creation of the compile command database by default. 2014-04-04 10:03:43 +02:00
Aris Adamantiadis
31fb4e1e69 build: remove OSX deprecated warnings for openssl 2014-02-02 21:41:32 +01:00
Andreas Schneider
6fe51b13fb src: Update my mail address. 2014-01-07 16:08:23 +01:00
Andreas Schneider
8bcbfb1642 cmake: Remove unused macro modules. 2014-01-07 16:07:00 +01:00
Aris Adamantiadis
4f3ee2fc7e Fix examples compilation on OSX (libargp) 2013-11-03 13:49:27 +01:00
Aris Adamantiadis
f565aeebfa Compile libssh with nacl if possible
Conflicts:
	DefineOptions.cmake
2013-11-03 13:18:26 +01:00
Andreas Schneider
f1ec4f11e3 cmake: Add CMOCKA_ROOT_DIR with hints and paths. 2013-08-01 16:55:40 +02:00
Andreas Schneider
74bbcf7e29 doc: Don't generate latex documentation. 2013-07-25 12:29:07 +02:00
Andreas Schneider
26c118890f cmake: Only build with _FORTIFY_SOURCE on release builds. 2013-07-25 10:02:01 +02:00
Andreas Schneider
1444d62d96 cmake: Document GSSAPI_FLAVOR_MIT and GSSAPI_FLAVOR_HEIMDAL. 2013-07-24 20:52:39 +02:00
Andreas Schneider
5ba88f01e8 cmake: Rewrote FindGSSAPI.cmake. 2013-07-24 20:48:14 +02:00
Andreas Schneider
c55ab44caf cmake: Update FindNSIS module. 2013-07-24 11:17:30 +02:00
Aris Adamantiadis
cb0f886a5c cmake: Add FindGSSAPI.cmake
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-13 14:19:23 +02:00
Andreas Schneider
97e7c95d21 cmake: Pass _FORTIFY_SOURCE directly to the preprocessor. 2013-07-13 13:54:00 +02:00