Skip to content

Commit

Permalink
send server-sig-algs using the same order as OpenSSH
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Jun 15, 2022
1 parent 92ea34e commit 8cff989
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ssh/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ var supportedMACs = []string{

var supportedCompressions = []string{compressionNone}

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

// hashFuncs keeps the mapping of supported signature algorithms to their
Expand Down

0 comments on commit 8cff989

Please sign in to comment.