diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2015-01-08 13:44:37 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2015-01-08 13:44:37 +0000 |
commit | 4d3e239b7078bc404f29d5f8d6a584a1e6716f20 (patch) | |
tree | 48aa2bf729878a6dbbfce3acefaf126d906e3d30 /usr.bin/ssh | |
parent | 8bb3a65e3952d58cd99d1c39b7aa3a40b2eba437 (diff) |
fix ssh_config FingerprintHash evaluation order; from Petr Lautrbach
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/readconf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 24ff6ad4a32..51034c1782e 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.224 2014/12/21 22:27:56 djm Exp $ */ +/* $OpenBSD: readconf.c,v 1.225 2015/01/08 13:44:36 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1452,6 +1452,7 @@ parse_int: goto parse_string; case oFingerprintHash: + intptr = &options->fingerprint_hash; arg = strdelim(&s); if (!arg || *arg == '\0') fatal("%.200s line %d: Missing argument.", @@ -1459,8 +1460,8 @@ parse_int: if ((value = ssh_digest_alg_by_name(arg)) == -1) fatal("%.200s line %d: Invalid hash algorithm \"%s\".", filename, linenum, arg); - if (*activep) - options->fingerprint_hash = value; + if (*activep && *intptr == -1) + *intptr = value; break; case oDeprecated: |