summaryrefslogtreecommitdiff
path: root/sshkey.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-11-18 06:39:02 +0000
committerDamien Miller <djm@mindrot.org>2019-11-18 17:42:11 +1100
commit740c4bc9875cbb4b9fc03fd5eac19df080f20df5 (patch)
tree025ff51e9a44c7ab27805efcde5a1247fe880430 /sshkey.c
parent85409cbb505d8c463ab6e2284b4039764c7243de (diff)
upstream: fix bug that prevented certification of ed25519-sk keys
OpenBSD-Commit-ID: 64c8cc6f5de2cdd0ee3a81c3a9dee8d862645996
Diffstat (limited to 'sshkey.c')
-rw-r--r--sshkey.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sshkey.c b/sshkey.c
index 90dcec07..8916f802 100644
--- a/sshkey.c
+++ b/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.
@@ -2978,9 +2978,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: