From 354535ff79380237924ac8fdc98f8cdf83e67da6 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Mon, 22 Jun 2020 06:00:06 +0000 Subject: [PATCH] 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 --- regress/unittests/sshsig/tests.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/regress/unittests/sshsig/tests.c b/regress/unittests/sshsig/tests.c index a131795cd..d82d4897a 100644 --- a/regress/unittests/sshsig/tests.c +++ b/regress/unittests/sshsig/tests.c @@ -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 * @@ -97,34 +97,39 @@ tests(void) #ifdef WITH_OPENSSL TEST_START("check RSA signature"); - check_sig("rsa", "rsa.sig", msg, namespace); + check_sig("rsa.pub", "rsa.sig", msg, namespace); TEST_DONE(); TEST_START("check DSA signature"); - check_sig("dsa", "dsa.sig", msg, namespace); + check_sig("dsa.pub", "dsa.sig", msg, namespace); TEST_DONE(); #ifdef OPENSSL_HAS_ECC TEST_START("check ECDSA signature"); - check_sig("ecdsa", "ecdsa.sig", msg, namespace); + check_sig("ecdsa.pub", "ecdsa.sig", msg, namespace); TEST_DONE(); #endif #endif TEST_START("check ED25519 signature"); - check_sig("ed25519", "ed25519.sig", msg, namespace); + check_sig("ed25519.pub", "ed25519.sig", msg, namespace); TEST_DONE(); #if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC) 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(); #endif 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_START("check ECDSA-SK webauthn signature"); + check_sig("ecdsa_sk_webauthn.pub", "ecdsa_sk_webauthn.sig", + msg, namespace); + TEST_DONE(); + sshbuf_free(msg); free(namespace); }