upstream: add support for verification of webauthn sshsig signature,
and example HTML/JS to generate webauthn signatures in SSH formats (also used to generate the testdata/* for the test). OpenBSD-Regress-ID: dc575be5bb1796fdf4b8aaee0ef52a6671a0f6fb
This commit is contained in:
parent
bb52e70fa5
commit
354535ff79
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: tests.c,v 1.1 2020/06/19 04:32:09 djm Exp $ */
|
/* $OpenBSD: tests.c,v 1.2 2020/06/22 06:00:06 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Regress test for sshbuf.h buffer API
|
* Regress test for sshbuf.h buffer API
|
||||||
*
|
*
|
||||||
|
@ -97,34 +97,39 @@ tests(void)
|
||||||
|
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
TEST_START("check RSA signature");
|
TEST_START("check RSA signature");
|
||||||
check_sig("rsa", "rsa.sig", msg, namespace);
|
check_sig("rsa.pub", "rsa.sig", msg, namespace);
|
||||||
TEST_DONE();
|
TEST_DONE();
|
||||||
|
|
||||||
TEST_START("check DSA signature");
|
TEST_START("check DSA signature");
|
||||||
check_sig("dsa", "dsa.sig", msg, namespace);
|
check_sig("dsa.pub", "dsa.sig", msg, namespace);
|
||||||
TEST_DONE();
|
TEST_DONE();
|
||||||
|
|
||||||
#ifdef OPENSSL_HAS_ECC
|
#ifdef OPENSSL_HAS_ECC
|
||||||
TEST_START("check ECDSA signature");
|
TEST_START("check ECDSA signature");
|
||||||
check_sig("ecdsa", "ecdsa.sig", msg, namespace);
|
check_sig("ecdsa.pub", "ecdsa.sig", msg, namespace);
|
||||||
TEST_DONE();
|
TEST_DONE();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TEST_START("check ED25519 signature");
|
TEST_START("check ED25519 signature");
|
||||||
check_sig("ed25519", "ed25519.sig", msg, namespace);
|
check_sig("ed25519.pub", "ed25519.sig", msg, namespace);
|
||||||
TEST_DONE();
|
TEST_DONE();
|
||||||
|
|
||||||
#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
|
#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
|
||||||
TEST_START("check ECDSA-SK signature");
|
TEST_START("check ECDSA-SK signature");
|
||||||
check_sig("ecdsa_sk", "ecdsa_sk.sig", msg, namespace);
|
check_sig("ecdsa_sk.pub", "ecdsa_sk.sig", msg, namespace);
|
||||||
TEST_DONE();
|
TEST_DONE();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TEST_START("check ED25519-SK signature");
|
TEST_START("check ED25519-SK signature");
|
||||||
check_sig("ed25519_sk", "ed25519_sk.sig", msg, namespace);
|
check_sig("ed25519_sk.pub", "ed25519_sk.sig", msg, namespace);
|
||||||
TEST_DONE();
|
TEST_DONE();
|
||||||
|
|
||||||
|
TEST_START("check ECDSA-SK webauthn signature");
|
||||||
|
check_sig("ecdsa_sk_webauthn.pub", "ecdsa_sk_webauthn.sig",
|
||||||
|
msg, namespace);
|
||||||
|
TEST_DONE();
|
||||||
|
|
||||||
sshbuf_free(msg);
|
sshbuf_free(msg);
|
||||||
free(namespace);
|
free(namespace);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue