]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: When loading FIDO2 resident keys, set the comment to the
authordjm@openbsd.org <djm@openbsd.org>
Mon, 24 Nov 2025 23:43:10 +0000 (23:43 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 24 Nov 2025 23:44:07 +0000 (10:44 +1100)
FIDO application string. This matches the behaviour of ssh-keygen -K

From Arian van Putten via GHPR608

OpenBSD-Commit-ID: 3fda54b44ed6a8a6f94cd3e39e69c1e672095712

ssh-add.c

index dc1c53ae01304c196017f970a0e02a67086a98a9..ac1891f62788eb0001d66a75ab20c3f9c3c60434 100644 (file)
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.183 2025/11/13 10:35:14 dtucker Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.184 2025/11/24 23:43:10 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -601,8 +601,8 @@ load_resident_keys(int agent_fd, const char *skprovider, int qflag,
                if ((fp = sshkey_fingerprint(key,
                    fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
                        fatal_f("sshkey_fingerprint failed");
-               if ((r = ssh_add_identity_constrained(agent_fd, key, "",
-                   lifetime, confirm, skprovider,
+               if ((r = ssh_add_identity_constrained(agent_fd, key,
+                   key->sk_application, lifetime, confirm, skprovider,
                    dest_constraints, ndest_constraints)) != 0) {
                        error("Unable to add key %s %s",
                            sshkey_type(key), fp);