From 63587a4aef69367fee28540e8e083af9b49c8035 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 10 Oct 2023 15:37:58 +0800 Subject: [PATCH] Respect SSH.KeygenPath option when calculating ssh key fingerprints (#27536) (#27551) Backport #27536 by @picsel2 Fixes #27535 Co-authored-by: Sebastian Grabowski --- models/asymkey/ssh_key_fingerprint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/asymkey/ssh_key_fingerprint.go b/models/asymkey/ssh_key_fingerprint.go index 8a8d4fce15..2d6af0e3d6 100644 --- a/models/asymkey/ssh_key_fingerprint.go +++ b/models/asymkey/ssh_key_fingerprint.go @@ -81,7 +81,7 @@ func CalcFingerprint(publicKeyContent string) (string, error) { fnName, fp string err error ) - if setting.SSH.StartBuiltinServer { + if len(setting.SSH.KeygenPath) == 0 { fnName = "calcFingerprintNative" fp, err = calcFingerprintNative(publicKeyContent) } else {