summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2003-07-02 20:37:49 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2003-07-02 20:37:49 +0000
commit9e970f02b1bf0c8a03bd7c599d12f8e2bbc5097d (patch)
tree78c6720c3e4eeff92c84392bfb5a8446febf5889 /usr.bin/ssh
parent1cd7584dc361eae217551899d5be9aa8702441c6 (diff)
convert hostkeyalias to lowercase, otherwise uppercase aliases will
not match at all; ok henning@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/ssh.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 6ecedc8b790..cb3c1b95362 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.194 2003/06/12 19:12:03 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.195 2003/07/02 20:37:48 markus Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -586,6 +586,13 @@ again:
if (options.hostname != NULL)
host = options.hostname;
+ /* force lowercase for hostkey matching */
+ if (options.host_key_alias != NULL) {
+ for (p = options.host_key_alias; *p; p++)
+ if (isupper(*p))
+ *p = tolower(*p);
+ }
+
if (options.proxy_command != NULL &&
strcmp(options.proxy_command, "none") == 0)
options.proxy_command = NULL;