Skip to content

Commit b002923

Browse files
author
Gusted
committed
Update SSH server
- Update SSH server libraries to support extensions negotations. - The extensions negotations are needed to communitcate with algorithms are accepted for "publickey" auth. - This PR adds 2 libraries. The modifed golang.org/x/crypto libraries(this in order to not mismatch with types in ssh.go) and a patched "github.com/gliderlabs/ssh" that has been modified in order to use the modified crypto library. - Resolves go-gitea#17798
1 parent 165ab17 commit b002923

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require (
66
cloud.google.com/go v0.78.0 // indirect
77
code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b
88
code.gitea.io/sdk/gitea v0.15.1
9+
codeberg.org/gusted/go-crypto v0.0.0-20220210182945-447280c7d883 // indirect
910
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be
1011
gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1
1112
gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5
@@ -148,6 +149,8 @@ replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142
148149

149150
replace github.com/satori/go.uuid v1.2.0 => github.com/gofrs/uuid v4.2.0+incompatible
150151

152+
replace github.com/gliderlabs/ssh => codeberg.org/gusted/gliderlabs-ssh v0.0.0-20220210193945-7e8a7a7862e8
153+
151154
exclude github.com/gofrs/uuid v3.2.0+incompatible
152155

153156
exclude github.com/gofrs/uuid v4.0.0+incompatible

go.sum

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b h1:uv9a8eGSdQ8Dr4Hy
4141
code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE=
4242
code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M=
4343
code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA=
44+
codeberg.org/gusted/gliderlabs-ssh v0.0.0-20220210193945-7e8a7a7862e8 h1:FGlD3sYQ96c1teuMzOolqDsdJHo8oEt8QzYSWGa8e9k=
45+
codeberg.org/gusted/gliderlabs-ssh v0.0.0-20220210193945-7e8a7a7862e8/go.mod h1:DlyiQTss9qB5V60w8IRMWCMYIPX+8cT1GgzWFCTvAsY=
46+
codeberg.org/gusted/go-crypto v0.0.0-20220210182945-447280c7d883 h1:Eu/c8Jq8YWvLiX49ZIBaLX69XjSzDpOPiD6LT6J81TM=
47+
codeberg.org/gusted/go-crypto v0.0.0-20220210182945-447280c7d883/go.mod h1:AdkJbWxlZ75bsMVCqv8XJJdHi9BZw9FvrQ3ctzJa2Zc=
4448
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
4549
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be h1:IzSwPVzd2hE6e67ujY8ReBCrQ5IFNd0uiBmC7Ux5IaY=
4650
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be/go.mod h1:/vR0YjlusOYvosKYW7QKcSnrY0nPLe4RQ/DGi3+i/Do=
@@ -311,9 +315,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
311315
github.com/fxamacker/cbor/v2 v2.2.0 h1:6eXqdDDe588rSYAi1HfZKbx6YYQO4mxQ9eC6xYpU/JQ=
312316
github.com/fxamacker/cbor/v2 v2.2.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
313317
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
314-
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
315-
github.com/gliderlabs/ssh v0.3.3 h1:mBQ8NiOgDkINJrZtoizkC3nDNYgSaWtxyem6S2XHBtA=
316-
github.com/gliderlabs/ssh v0.3.3/go.mod h1:ZSS+CUoKHDrqVakTfTWUlKSr9MtMFkC4UvtQKD7O914=
317318
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
318319
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
319320
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=

modules/ssh/ssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import (
2727
"code.gitea.io/gitea/modules/setting"
2828
"code.gitea.io/gitea/modules/util"
2929

30+
gossh "codeberg.org/gusted/go-crypto/ssh"
3031
"github.com/gliderlabs/ssh"
31-
gossh "golang.org/x/crypto/ssh"
3232
)
3333

3434
type contextKey string

0 commit comments

Comments
 (0)