aboutsummaryrefslogtreecommitdiff
path: root/tests/torture_key.c
AgeCommit message (Collapse)AuthorFilesLines
2022-08-03tests: Refactor and provide plain PKCS8 PEM formatJakub Jelen1-701/+865
This also allows testing mbedtls with the PKCS8 PEM files Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2020-02-11pki: add support for sk-ecdsa and sk-ed25519Sebastian Kinne1-0/+4
This adds server-side support for the newly introduced OpenSSH keytypes sk-ecdsa-sha2-nistp256@openssh.com and sk-ed25519@openssh.com (including their corresponding certificates), which are backed by U2F/FIDO2 tokens. Change-Id: Ib73425c572601c3002be45974e6ea051f1d7efdc Signed-off-by: Sebastian Kinne <skinne@google.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-12-20torture_key: Adds public keys in PEM format - as required by p11tool.Sahana Prasad1-4/+58
Signed-off-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-09-24pki_crypto: Support Ed25519 keys in PEM filesAnderson Toshiyuki Sasaki1-11/+27
This adds support for Ed25519 keys from files in PEM format when using OpenSSL with Ed25519 support. The default encoding for the PEM file is expected to be PKCS#8. Encrypted files are supported. For the lack of an API, it is not possible to export keys in PEM format, only in OpenSSH format. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-06-13tests: Add PKCS#8 PEM encrypted private keysAnderson Toshiyuki Sasaki1-7/+109
Copies of the DSA, RSA, and ECDSA keys were added encoded in PKCS#8 format. For now, these keys are only used when testing with OpenSSL. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-04-17tests/unittests: test ECDSA/ED25519 supportBen Toews1-0/+71
These tests are copied from the existing RSA/DSA certificate tests. They cover importing certificates. Signed-off-by: Ben Toews <mastahyeti@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-04-17libssh: deprecate SSH_KEYTYPE_ECDSABen Toews1-31/+27
This type is imprecise. We often need the ecdsa_nid in addition to the key type in order to do anything. We replace this singluar ECDSA type with one type per curve. Signed-off-by: Ben Toews <mastahyeti@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-18tests: Provide testing keys also in OpenSSH formatJakub Jelen1-5/+244
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>
2018-09-17tests: Use stdbool for with_passphrase argumentJakub Jelen1-2/+2
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-29pki: Fix random memory corruptionAndreas Schneider1-2/+1
Fixes T78 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-10torture_key: Add ecdsa keys with passphraseAndreas Schneider1-3/+35
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-10tests: Move torture keys to own fileAndreas Schneider1-0/+354
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>