diff options
author | zeripath <art27@cantab.net> | 2022-07-06 21:49:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-06 16:49:27 -0400 |
commit | 354bfbe77948b9eaca372ab314734dccaf6f8d49 (patch) | |
tree | b860f9e667977f89901d14bd63960b6c7a307a4c /modules/setting/setting.go | |
parent | 1e43a885780c0f04cca3e891f43902d573f1d993 (diff) | |
download | gitea-354bfbe77948b9eaca372ab314734dccaf6f8d49.tar.gz gitea-354bfbe77948b9eaca372ab314734dccaf6f8d49.zip |
Allow RSA 2047 bit keys (#20272)
Unfortunately it appears that 2048 bit RSA keys can occasionally be created in such
a way that they appear to have 2047 bit length. This PR simply changes our defaults to
allow these.
Fix #20249
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 5400bf5b9f..510e00e5ab 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -170,7 +170,7 @@ var ( ServerMACs: []string{"hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1"}, KeygenPath: "ssh-keygen", MinimumKeySizeCheck: true, - MinimumKeySizes: map[string]int{"ed25519": 256, "ed25519-sk": 256, "ecdsa": 256, "ecdsa-sk": 256, "rsa": 2048}, + MinimumKeySizes: map[string]int{"ed25519": 256, "ed25519-sk": 256, "ecdsa": 256, "ecdsa-sk": 256, "rsa": 2047}, ServerHostKeys: []string{"ssh/gitea.rsa", "ssh/gogs.rsa"}, AuthorizedKeysCommandTemplate: "{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}", PerWriteTimeout: PerWriteTimeout, |