From: djm@openbsd.org Date: Wed, 7 Oct 2020 02:20:35 +0000 (+0000) Subject: upstream: simply disable UpdateHostkeys when a certificate X-Git-Tag: V_8_5_P1~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4f14e023cafee1cd9ebe4bb0db4029e6e1fafac;p=thirdparty%2Fopenssh-portable.git upstream: simply disable UpdateHostkeys when a certificate successfully authenticated the host; simpler than the complicated plumbing via kex->flags we have now. ok markus@ OpenBSD-Commit-ID: 80e39644eed75717d563a7f177e8117a0e14f42c --- diff --git a/sshconnect.c b/sshconnect.c index 31e012df2..ba07a5ff3 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.335 2020/10/04 09:45:01 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.336 2020/10/07 02:20:35 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -609,7 +609,12 @@ check_host_cert(const char *host, const struct sshkey *key) "(null)" : key->cert->signature_type, ssh_err(r)); return 0; } - + /* Do not attempt hostkey update if a certificate was successful */ + if (options.update_hostkeys != 0) { + options.update_hostkeys = 0; + debug3("%s: certificate host key in use; disabling " + "UpdateHostkeys", __func__); + } return 1; }