diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-03-10 04:26:06 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-03-10 15:35:39 +1100 |
commit | db2597207e69912f2592cd86a1de8e948a9d7ffb (patch) | |
tree | a21ec4fe01db6c7ccfcfdc52cacb9761a4693a52 /ssh-keygen.c | |
parent | df9936936c695f85c1038bd706d62edf752aca4b (diff) |
upstream commit
ensure hostname is lower-case before hashing it;
bz#2591 reported by Griff Miller II; ok dtucker@
Upstream-ID: c3b8b93804f376bd00d859b8bcd9fc0d86b4db17
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 6fd1f034..f17af036 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.298 2017/03/06 02:03:20 dtucker Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.299 2017/03/10 04:26:06 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1108,6 +1108,7 @@ known_hosts_hash(struct hostkey_foreach_line *l, void *_ctx) */ ohosts = hosts = xstrdup(l->hosts); while ((cp = strsep(&hosts, ",")) != NULL && *cp != '\0') { + lowercase(cp); if ((hashed = host_hash(cp, NULL, 0)) == NULL) fatal("hash_host failed"); fprintf(ctx->out, "%s %s\n", hashed, l->rawkey); |