diff options
author | 2000-09-05 19:18:47 +0000 | |
---|---|---|
committer | 2000-09-05 19:18:47 +0000 | |
commit | 76d00d3e92280732211918caa8adf63e9539a8da (patch) | |
tree | 8374988b126f80d0b0a900006004511e1cd47c87 /usr.bin/ssh/ssh-add.c | |
parent | Support detach of xl(4) devices, mainly to allow the ejection and insertion of (diff) | |
download | wireguard-openbsd-76d00d3e92280732211918caa8adf63e9539a8da.tar.xz wireguard-openbsd-76d00d3e92280732211918caa8adf63e9539a8da.zip |
enable ssh-add -d for DSA keys
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 48053739b66..cebecc21719 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.20 2000/08/28 03:50:54 deraadt Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.21 2000/09/05 19:18:48 markus Exp $"); #include <openssl/evp.h> #include <openssl/rsa.h> @@ -31,8 +31,12 @@ delete_file(AuthenticationConnection *ac, const char *filename) public = key_new(KEY_RSA); if (!load_public_key(filename, public, &comment)) { - printf("Bad key file %s: %s\n", filename, strerror(errno)); - return; + key_free(public); + public = key_new(KEY_DSA); + if (!try_load_public_key(filename, public, &comment)) { + printf("Bad key file %s\n", filename); + return; + } } if (ssh_remove_identity(ac, public)) fprintf(stderr, "Identity removed: %s (%s)\n", filename, comment); |