summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2016-12-06 07:48:01 +0000
committerdjm <djm@openbsd.org>2016-12-06 07:48:01 +0000
commite7d2538a32ce55c290dcd47d03936ee394db5b9d (patch)
tree4070d7cb20c68c672458cb4843125f13ade5f7d8 /usr.bin/ssh/ssh.c
parentavoid a potentially uninitialised return value (diff)
downloadwireguard-openbsd-e7d2538a32ce55c290dcd47d03936ee394db5b9d.tar.xz
wireguard-openbsd-e7d2538a32ce55c290dcd47d03936ee394db5b9d.zip
make IdentityFile successfully load and use certificates that have no
corresponding bare public key. E.g. just a private id_rsa and certificate id_rsa-cert.pub (and no id_rsa.pub). bz#2617 ok dtucker@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index d6395d412f2..025db6b39fc 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.447 2016/09/30 09:19:13 markus Exp $ */
+/* $OpenBSD: ssh.c,v 1.448 2016/12/06 07:48:01 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2078,8 +2078,9 @@ load_public_identity_files(void)
free(cp);
continue;
}
+ /* NB. leave filename pointing to private key */
+ identity_files[n_ids] = xstrdup(filename);
identity_keys[n_ids] = public;
- identity_files[n_ids] = cp;
n_ids++;
}