summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-add.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2017-05-04 06:10:57 +0000
committerdjm <djm@openbsd.org>2017-05-04 06:10:57 +0000
commite24c11f14322da1ea41727971b238809b3b830bd (patch)
tree8f3f77aa57e17bcea862e217a290fa7c96d52df0 /usr.bin/ssh/ssh-add.c
parentanother tentacle: cipher_set_key_string() was only ever used for SSHv1 (diff)
downloadwireguard-openbsd-e24c11f14322da1ea41727971b238809b3b830bd.tar.xz
wireguard-openbsd-e24c11f14322da1ea41727971b238809b3b830bd.zip
since a couple of people have asked, leave a comment explaining why we
retain SSH v.1 support in the "delete all keys from agent" path.
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r--usr.bin/ssh/ssh-add.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c
index e72d8ae2865..11ae9eaee34 100644
--- a/usr.bin/ssh/ssh-add.c
+++ b/usr.bin/ssh/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.129 2017/04/30 23:10:43 djm Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.130 2017/05/04 06:10:57 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -153,6 +153,11 @@ delete_all(int agent_fd)
{
int ret = -1;
+ /*
+ * Since the agent might be forwarded, old or non-OpenSSH, when asked
+ * to remove all keys, attempt to remove both protocol v.1 and v.2
+ * keys.
+ */
if (ssh_remove_all_identities(agent_fd, 2) == 0)
ret = 0;
/* ignore error-code for ssh1 */