git: a5d3d9733259 - releng/15.2 - ssh: use defaultkey sentinel for ML-DSA-44 default host key

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Thu, 12 Nov 2026 23:58:24 UTC
The branch releng/15.2 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=a5d3d97332591c211c9f28b8a418997ba78fb9c7

commit a5d3d97332591c211c9f28b8a418997ba78fb9c7
Author:     Osvaldo Janeri Filho <ojanerif@amd.com>
AuthorDate: 2026-10-20 19:11:32 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-11-12 23:58:04 +0000

    ssh: use defaultkey sentinel for ML-DSA-44 default host key
    
    servconf_add_hostkey() compares its file argument to defaultkey by
    pointer to skip an unreadable default key; the ML-DSA-44 entry passed
    the "[default]" literal, so the skip (and the "No host key files found"
    fallback) never applied to it.
    
    Approved by:    re (cperciva)
    MFC after:      1 week
    Reviewed by:    emaste
    Fixes: bb5c77e9d281 ("OpenSSH: Update to 10.4p1")
    Differential Revision:  https://reviews.freebsd.org/D60922
    
    (cherry picked from commit 2d6f961164e4ab7e823972336dc9cfaae6a88ed8)
    (cherry picked from commit 55ede03fc24aa8de58814563e82e72cf8b34d9cc)
---
 crypto/openssh/servconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c
index 06c45557f145..32430e775962 100644
--- a/crypto/openssh/servconf.c
+++ b/crypto/openssh/servconf.c
@@ -338,7 +338,7 @@ fill_default_server_options(ServerOptions *options)
 		    _PATH_HOST_ECDSA_KEY_FILE, 0);
 		servconf_add_hostkey(defaultkey, 0, options,
 		    _PATH_HOST_ED25519_KEY_FILE, 0);
-		servconf_add_hostkey("[default]", 0, options,
+		servconf_add_hostkey(defaultkey, 0, options,
 		    _PATH_HOST_MLDSA44_ED25519_KEY_FILE, 0);
 	}
 	if (options->num_host_key_files == 0)