Respect SSH.KeygenPath option when calculating ssh key fingerprints (#27536) (#27551)

Backport #27536 by @picsel2

Fixes #27535

Co-authored-by: Sebastian Grabowski <sebastian@grabel.de>
This commit is contained in:
Giteabot 2023-10-10 15:37:58 +08:00 committed by GitHub
parent 29d3949271
commit 63587a4aef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {