Skip to content

Commit b59f56d

Browse files
drakkaniQQBot
authored andcommitted
send server-sig-algs using the same order as OpenSSH
Signed-off-by: Nicola Murino <[email protected]>
1 parent 654b617 commit b59f56d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ssh/common.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ var supportedMACs = []string{
9797

9898
var supportedCompressions = []string{compressionNone}
9999

100-
// supportedServerSigAlgs defines the algorithms supported for pubkey authentication
101-
// in no particular order. See RFC 8308, Section 3.1.
102-
var supportedServerSigAlgs = []string{KeyAlgoRSASHA256,
103-
KeyAlgoRSASHA512, KeyAlgoRSA,
104-
KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521,
105-
KeyAlgoSKECDSA256, KeyAlgoED25519, KeyAlgoSKED25519,
106-
KeyAlgoDSA,
100+
// supportedServerSigAlgs defines the algorithms supported for pubkey authentication.
101+
// Order should not matter, but to avoid any issues we use the same order as OpenSSH.
102+
// See RFC 8308, Section 3.1.
103+
var supportedServerSigAlgs = []string{KeyAlgoED25519, KeyAlgoSKED25519,
104+
KeyAlgoRSA, KeyAlgoRSASHA256, KeyAlgoRSASHA512,
105+
KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521,
106+
KeyAlgoSKECDSA256,
107107
}
108108

109109
// hashFuncs keeps the mapping of supported signature algorithms to their

0 commit comments

Comments
 (0)