tests: Provide testing keys also in OpenSSH format

This extends the torture API to provide a way to request
keys in different formats. This extends the keys with
private keys in the new OpenSSH format (default since
OpenSSH 7.8).

This also needs modifications to the ed25519 tests, which
do not support PEM format and expected the new format out of the
box.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2018-09-06 16:52:32 +02:00
committed by Andreas Schneider
parent d23bda8181
commit e365aed6d2
4 changed files with 272 additions and 18 deletions

View File

@@ -629,7 +629,7 @@ static void torture_setup_create_sshd_config(void **state)
"%s/sshd/ssh_host_ed25519_key",
s->socket_dir);
torture_write_file(ed25519_hostkey,
torture_get_testkey(SSH_KEYTYPE_ED25519, 0, 0));
torture_get_openssh_testkey(SSH_KEYTYPE_ED25519, 0, 0));
#ifdef HAVE_DSA
snprintf(dsa_hostkey,