1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-06-29 23:41:44 +03:00
Commit Graph

27 Commits

Author SHA1 Message Date
488fb47c32 tests: Add frees to avoid memory leak errors
The added frees are unnecessary, but the static analyser does not know.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 6eef4b4a3c)
2018-09-27 15:39:20 +02:00
ee034e0484 tests: Replace ssh_string_free() with SSH_STRING_FREE()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit ca7da823c3)
2018-09-27 15:39:20 +02:00
1509693cce tests: null terminate buffer in torture_read_one_line()
CID 1393902

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 08:52:42 +02:00
b0af812710 tests: Move torture keys to own file
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-10 22:31:02 +01:00
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
f0ddde4826 Fix config.h includes
We need stdlib.h and string.h in priv.h for free() and memset().

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-28 14:31:37 +02:00
82a80b205b tests: Migrate to new cmocka API
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-07 10:40:12 +02:00
8979150745 tests: Migrate torture_keyfiles to testkey functions
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 09:47:37 +02:00
d42a1a35b0 tests: allow conditionnal execution on pattern
Option can be used to filter out irrelevant tests
usage: ./torture_pki '*ed25519'

Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 17:34:15 +01:00
fb4f1412ba build: Fix the build of keyfiles torture test. 2011-08-28 14:50:28 +02:00
37b80e9261 pki: Move keyfiles to pki_gcrypt.c. 2011-08-08 15:28:31 +02:00
63c42f066f tests: Fixed checking return values of system(). 2011-02-05 15:23:19 +01:00
61852635b5 tests: Moved assert to the write place in torture_keyfiles.
Found by clang-analyzer http://test.libssh.org/clang-analyzer/
2011-01-06 11:44:02 +01:00
7d9f889911 tests: Added missing asserts in torture_keyfiles.
Found by clang-analyzer http://test.libssh.org/clang-analyzer/
2011-01-06 10:15:01 +01:00
3f538b3ddd Call ssh_init()/ssh_finalize bf/af each testcase 2011-01-02 17:25:51 +01:00
2bc03d22a1 tests: Migrated torture_keyfiles to cmockery. 2010-12-28 22:14:47 +01:00
f95157297e Factorize all the main functions in unit tests 2010-05-18 22:25:06 +02:00
b23b3f1d99 Sanitize libssh namespace + legacy wrappers 2010-05-14 00:51:08 +02:00
3f14d7a54a More detailed tests 2010-05-05 14:57:47 +02:00
904c6ed853 Renamed private type TYPE_RSA to SSH_KEYTYPE_*
Also made this enum public
2010-04-28 12:14:03 +02:00
696ef7aecc Added privatekey_from_file with passphrase test 2010-04-27 23:48:18 +02:00
9603f2520b make torture_keyfiles silent 2010-04-27 23:28:18 +02:00
a5a806f7ee Added test for privatekey_from_file 2010-04-27 23:25:21 +02:00
b5eb08ad09 Fixed the torture_keyfiles test. 2010-03-28 23:46:56 +02:00
90d72c214e Fixed the torture_pubkey_generate_from_privkey test. 2010-03-13 16:51:52 +01:00
8fd6c8bc02 Fixed a memory leak in keyfile torture test. 2010-03-13 16:38:43 +01:00
1264557f0e Added a test for keyfiles.c. 2010-03-04 20:41:21 +01:00