diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2019-10-16 11:16:17 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-12-23 14:31:32 +0100 |
commit | 3d2570ff5ffa5be69df01dfcf46d1213a3acfbd4 (patch) | |
tree | d3e356a3d4532599d0423ba468617f34e2e1fd30 | |
parent | 3063a57fc8ac50d71cc2bbcfce4fc50662068275 (diff) | |
download | libssh-3d2570ff5ffa5be69df01dfcf46d1213a3acfbd4.tar.gz libssh-3d2570ff5ffa5be69df01dfcf46d1213a3acfbd4.tar.xz libssh-3d2570ff5ffa5be69df01dfcf46d1213a3acfbd4.zip |
pkd: use detected OpenSSH supported key types
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/pkd/pkd_client.h | 28 |
2 files changed, 5 insertions, 26 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5bc759d2..20e42f1a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -11,7 +11,8 @@ include_directories(${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${libssh_BINARY_DIR} ${libssh_SOURCE_DIR}/src - ${CMAKE_CURRENT_SOURCE_DIR}) + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/tests) set(TORTURE_LINK_LIBRARIES ${CMOCKA_LIBRARY} diff --git a/tests/pkd/pkd_client.h b/tests/pkd/pkd_client.h index 474ca174..63bf0f29 100644 --- a/tests/pkd/pkd_client.h +++ b/tests/pkd/pkd_client.h @@ -9,42 +9,20 @@ #define __PKD_CLIENT_H__ #include "config.h" +#include "tests_config.h" /* OpenSSH */ #define OPENSSH_BINARY "ssh" #define OPENSSH_KEYGEN "ssh-keygen" -#define OPENSSH_HOSTKEY_ALGOS_DEFAULT "ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa" -#define OPENSSH_PKACCEPTED_DEFAULT "ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com" - -#if HAVE_ECC -#define OPENSSH_HOSTKEY_ALGOS_ECDSA ",ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521" -#define OPENSSH_PKACCEPTED_ECDSA ",ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com" -#else /* HAVE_ECC */ -#define OPENSSH_HOSTKEY_ALGOS_ECDSA "" -#define OPENSSH_PKACCEPTED_ECDSA "" -#endif /* HAVE_ECC */ - -#if HAVE_DSA -#define OPENSSH_HOSTKEY_ALGOS_DSA ",ssh-dss" -#define OPENSSH_PKACCEPTED_DSA ",ssh-dss,ssh-dss-cert-v01@openssh.com" -#else /* HAVE_DSA */ -#define OPENSSH_HOSTKEY_ALGOS_DSA "" -#define OPENSSH_PKACCEPTED_DSA "" -#endif /* HAVE_DSA */ - #define OPENSSH_HOSTKEY_ALGOS \ "-o HostKeyAlgorithms=" \ - OPENSSH_HOSTKEY_ALGOS_DEFAULT \ - OPENSSH_HOSTKEY_ALGOS_ECDSA \ - OPENSSH_HOSTKEY_ALGOS_DSA + OPENSSH_KEYS #define OPENSSH_PKACCEPTED_TYPES \ "-o PubkeyAcceptedKeyTypes=" \ - OPENSSH_PKACCEPTED_DEFAULT \ - OPENSSH_PKACCEPTED_ECDSA \ - OPENSSH_PKACCEPTED_DSA + OPENSSH_KEYS #define OPENSSH_CMD_START(hostkey_algos) \ OPENSSH_BINARY " " \ |