diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-09-06 16:52:32 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-18 09:53:49 +0200 |
commit | e365aed6d2cf829d55e6f0c26203a8e66976cf28 (patch) | |
tree | 0d0ea52f7ce3d6bce42b39e65cbfc38711d4a954 /tests/torture_key.h | |
parent | d23bda8181b0388c92d5548bc2d438875e4800a8 (diff) | |
download | libssh-e365aed6d2cf829d55e6f0c26203a8e66976cf28.tar.gz libssh-e365aed6d2cf829d55e6f0c26203a8e66976cf28.tar.xz libssh-e365aed6d2cf829d55e6f0c26203a8e66976cf28.zip |
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>
Diffstat (limited to 'tests/torture_key.h')
-rw-r--r-- | tests/torture_key.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/torture_key.h b/tests/torture_key.h index 7a476e73..1ae85099 100644 --- a/tests/torture_key.h +++ b/tests/torture_key.h @@ -28,6 +28,12 @@ #define TORTURE_TESTKEY_PASSWORD "libssh-rocks" +/* Return the encrypted private key in a new OpenSSH format */ +const char *torture_get_openssh_testkey(enum ssh_keytypes_e type, + int ecdsa_bits, + bool with_passphrase); + +/* Return the private key in the legacy PEM format */ const char *torture_get_testkey(enum ssh_keytypes_e type, int ecdsa_bits, bool with_passphrase); |