mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
tests/pkd: Add tests using certificates with SHA2 in signatures
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
73b94abea4
commit
4416a0dae6
@@ -112,6 +112,13 @@ void setup_openssh_client_keys() {
|
||||
}
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
if (access(OPENSSH_RSA_TESTKEY "-sha256-cert.pub", F_OK) != 0) {
|
||||
rc = system_checked(OPENSSH_KEYGEN " -I ident -t rsa-sha2-256 "
|
||||
"-s " OPENSSH_CA_TESTKEY " "
|
||||
OPENSSH_RSA_TESTKEY ".pub 2>/dev/null");
|
||||
}
|
||||
assert_int_equal(rc, 0);
|
||||
|
||||
if (access(OPENSSH_ECDSA256_TESTKEY, F_OK) != 0) {
|
||||
rc = system_checked(OPENSSH_KEYGEN " -t ecdsa -b 256 -q -N \"\" -f "
|
||||
OPENSSH_ECDSA256_TESTKEY);
|
||||
@@ -180,6 +187,7 @@ void setup_openssh_client_keys() {
|
||||
void cleanup_openssh_client_keys() {
|
||||
cleanup_key(OPENSSH_CA_TESTKEY);
|
||||
cleanup_key(OPENSSH_RSA_TESTKEY);
|
||||
cleanup_file(OPENSSH_RSA_TESTKEY "-sha256-cert.pub");
|
||||
cleanup_key(OPENSSH_ECDSA256_TESTKEY);
|
||||
cleanup_key(OPENSSH_ECDSA384_TESTKEY);
|
||||
cleanup_key(OPENSSH_ECDSA521_TESTKEY);
|
||||
|
||||
Reference in New Issue
Block a user