1
1
libssh/tests/pkd/pkd_daemon.h
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

44 строки
747 B
C

/*
* pkd_daemon.h -- tests use this interface to start, stop pkd
* instances and get results
*
* (c) 2014 Jon Simons
*/
#ifndef __PKD_DAEMON_H__
#define __PKD_DAEMON_H__
enum pkd_hostkey_type_e {
PKD_RSA,
#ifdef HAVE_DSA
PKD_DSA,
#endif
PKD_ECDSA
};
struct pkd_daemon_args {
enum pkd_hostkey_type_e type;
const char *hostkeypath;
struct {
int list;
int log_stdout;
int log_stderr;
int libssh_log_level;
const char *testname;
const char *testmatch;
unsigned int iterations;
} opts;
};
struct pkd_result {
int ok;
};
int pkd_start(struct pkd_daemon_args *args);
void pkd_stop(struct pkd_result *out);
#endif /* __PKD_DAEMON_H__ */