]> source.dussan.org Git - gitea.git/commitdiff
Respect SSH.KeygenPath option when calculating ssh key fingerprints (#27536) (#27551)
authorGiteabot <teabot@gitea.io>
Tue, 10 Oct 2023 07:37:58 +0000 (15:37 +0800)
committerGitHub <noreply@github.com>
Tue, 10 Oct 2023 07:37:58 +0000 (07:37 +0000)
Backport #27536 by @picsel2

Fixes #27535

Co-authored-by: Sebastian Grabowski <sebastian@grabel.de>
models/asymkey/ssh_key_fingerprint.go

index 8a8d4fce153d0524f71d87ea44e04d3cf7a902cd..2d6af0e3d6cdf33397d8e3d991915ebfeda36efc 100644 (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 {