778652460f
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
51 строка
1.3 KiB
C
51 строка
1.3 KiB
C
/*
|
|
* pkd_keyutil.h --
|
|
*
|
|
* (c) 2014 Jon Simons
|
|
*/
|
|
|
|
#ifndef __PKD_KEYUTIL_H__
|
|
#define __PKD_KEYUTIL_H__
|
|
|
|
#include "config.h"
|
|
|
|
/* Server keys. */
|
|
#ifdef HAVE_DSA
|
|
#define LIBSSH_DSA_TESTKEY "libssh_testkey.id_dsa"
|
|
#endif
|
|
#define LIBSSH_RSA_TESTKEY "libssh_testkey.id_rsa"
|
|
#define LIBSSH_ECDSA_256_TESTKEY "libssh_testkey.id_ecdsa256"
|
|
#define LIBSSH_ECDSA_384_TESTKEY "libssh_testkey.id_ecdsa384"
|
|
#define LIBSSH_ECDSA_521_TESTKEY "libssh_testkey.id_ecdsa521"
|
|
|
|
#ifdef HAVE_DSA
|
|
void setup_dsa_key(void);
|
|
#endif
|
|
void setup_rsa_key(void);
|
|
void setup_ecdsa_keys(void);
|
|
#ifdef HAVE_DSA
|
|
void cleanup_dsa_key(void);
|
|
#endif
|
|
void cleanup_rsa_key(void);
|
|
void cleanup_ecdsa_keys(void);
|
|
|
|
/* Client keys. */
|
|
#ifdef HAVE_DSA
|
|
#define OPENSSH_DSA_TESTKEY "openssh_testkey.id_dsa"
|
|
#endif
|
|
#define OPENSSH_RSA_TESTKEY "openssh_testkey.id_rsa"
|
|
#define OPENSSH_ECDSA256_TESTKEY "openssh_testkey.id_ecdsa256"
|
|
#define OPENSSH_ECDSA384_TESTKEY "openssh_testkey.id_ecdsa384"
|
|
#define OPENSSH_ECDSA521_TESTKEY "openssh_testkey.id_ecdsa521"
|
|
#define OPENSSH_ED25519_TESTKEY "openssh_testkey.id_ed25519"
|
|
|
|
#define DROPBEAR_RSA_TESTKEY "dropbear_testkey.id_rsa"
|
|
|
|
void setup_openssh_client_keys(void);
|
|
void cleanup_openssh_client_keys(void);
|
|
|
|
void setup_dropbear_client_rsa_key(void);
|
|
void cleanup_dropbear_client_rsa_key(void);
|
|
|
|
#endif /* __PKD_KEYUTIL_H__ */
|