summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-05-04 06:10:57 +0000
committerDamien Miller <djm@mindrot.org>2017-05-08 09:18:27 +1000
commit744bde79c3361e2153cb395a2ecdcee6c713585d (patch)
tree92be0f1ec014b6fb890ceca970afe367e7dc49e8 /ssh-add.c
parent0c378ff6d98d80bc465a4a6a787670fb9cc701ee (diff)
upstream commit
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. Upstream-ID: 4b42dcfa339813c15fe9248a2c1b7ed41c21bbb4
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssh-add.c b/ssh-add.c
index 37ce56dfd..5f62420f9 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-add.c,v 1.129 2017/04/30 23:10:43 djm Exp $ */ 1/* $OpenBSD: ssh-add.c,v 1.130 2017/05/04 06:10:57 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -161,6 +161,11 @@ delete_all(int agent_fd)
161{ 161{
162 int ret = -1; 162 int ret = -1;
163 163
164 /*
165 * Since the agent might be forwarded, old or non-OpenSSH, when asked
166 * to remove all keys, attempt to remove both protocol v.1 and v.2
167 * keys.
168 */
164 if (ssh_remove_all_identities(agent_fd, 2) == 0) 169 if (ssh_remove_all_identities(agent_fd, 2) == 0)
165 ret = 0; 170 ret = 0;
166 /* ignore error-code for ssh1 */ 171 /* ignore error-code for ssh1 */