[openssh-commits] [openssh] 04/04: upstream: repair private key fingerprint printing to also print
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Apr 17 17:17:54 AEST 2020
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 32f2d0aad42c15e19bd3b07496076ca891573a58
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Apr 17 07:16:07 2020 +0000
upstream: repair private key fingerprint printing to also print
comment after regression caused by my recent pubkey loading refactor.
Reported by loic AT venez.fr, ok dtucker@
OpenBSD-Commit-ID: f8db49acbee6a6ccb2a4259135693b3cceedb89e
---
ssh-keygen.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 802fd25c..c181b58a 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.405 2020/04/03 02:26:56 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.406 2020/04/17 07:16:07 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -910,22 +910,21 @@ fingerprint_private(const char *path)
{
struct stat st;
char *comment = NULL;
- struct sshkey *public = NULL;
+ struct sshkey *key = NULL;
int r;
if (stat(identity_file, &st) == -1)
fatal("%s: %s", path, strerror(errno));
- if ((r = sshkey_load_public(path, &public, &comment)) != 0) {
- debug("load public \"%s\": %s", path, ssh_err(r));
- if ((r = sshkey_load_private(path, NULL,
- &public, &comment)) != 0) {
- debug("load private \"%s\": %s", path, ssh_err(r));
+ if ((r = sshkey_load_private(path, NULL, &key, &comment)) != 0) {
+ debug("load private \"%s\": %s", path, ssh_err(r));
+ if ((r = sshkey_load_public(path, &key, &comment)) != 0) {
+ debug("load public \"%s\": %s", path, ssh_err(r));
fatal("%s is not a key file.", path);
}
}
- fingerprint_one_key(public, comment);
- sshkey_free(public);
+ fingerprint_one_key(key, comment);
+ sshkey_free(key);
free(comment);
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list