summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshkey.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2019-11-18 06:39:02 +0000
committerdjm <djm@openbsd.org>2019-11-18 06:39:02 +0000
commit6350a41674c9a0161f2b40947507a3c5ed59ca17 (patch)
treef5400798908cc6164b5c8fae2957481be79ab7c4 /usr.bin/ssh/sshkey.c
parentallow *-sk key types to be turned into certificates (diff)
downloadwireguard-openbsd-6350a41674c9a0161f2b40947507a3c5ed59ca17.tar.xz
wireguard-openbsd-6350a41674c9a0161f2b40947507a3c5ed59ca17.zip
fix bug that prevented certification of ed25519-sk keys
Diffstat (limited to 'usr.bin/ssh/sshkey.c')
-rw-r--r--usr.bin/ssh/sshkey.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c
index abad883b27a..c890f7b71ec 100644
--- a/usr.bin/ssh/sshkey.c
+++ b/usr.bin/ssh/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.93 2019/11/15 06:00:20 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.94 2019/11/18 06:39:02 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -2921,9 +2921,15 @@ sshkey_certify_custom(struct sshkey *k, struct sshkey *ca, const char *alg,
break;
#endif /* WITH_OPENSSL */
case KEY_ED25519_CERT:
+ case KEY_ED25519_SK_CERT:
if ((ret = sshbuf_put_string(cert,
k->ed25519_pk, ED25519_PK_SZ)) != 0)
goto out;
+ if (k->type == KEY_ED25519_SK_CERT) {
+ if ((ret = sshbuf_put_cstring(cert,
+ k->sk_application)) != 0)
+ goto out;
+ }
break;
#ifdef WITH_XMSS
case KEY_XMSS_CERT: