Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove chacha20 cipher #62

Merged
merged 4 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/ssh-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func configureProxy(logger lager.Logger, sshProxyConfig config.SSHProxyConfig) (
if sshProxyConfig.AllowedCiphers != "" {
sshConfig.Config.Ciphers = strings.Split(sshProxyConfig.AllowedCiphers, ",")
} else {
sshConfig.Config.Ciphers = []string{"chacha20-poly1305@openssh.com", "aes128-gcm@openssh.com", "aes256-ctr", "aes192-ctr", "aes128-ctr"}
sshConfig.Config.Ciphers = []string{"aes128-gcm@openssh.com", "aes256-ctr", "aes192-ctr", "aes128-ctr"}
}

if sshProxyConfig.AllowedMACs != "" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/ssh-proxy/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,9 @@ var _ = Describe("SSH proxy", Serial, func() {
clientConfig.Ciphers = []string{"arcfour128"}
})

It("errors when the client doesn't provide any of the algorithms: 'chacha20-poly1305@openssh.com', 'aes128-gcm@openssh.com', 'aes128-gcm@openssh.com', 'aes256-ctr', 'aes192-ctr', 'aes128-ctr'", func() {
It("errors when the client doesn't provide any of the algorithms: 'aes128-gcm@openssh.com', 'aes128-gcm@openssh.com', 'aes256-ctr', 'aes192-ctr', 'aes128-ctr'", func() {
_, err := ssh.Dial("tcp", address, clientConfig)
Expect(err).To(MatchError("ssh: handshake failed: ssh: no common algorithm for client to server cipher; client offered: [arcfour128], server offered: [chacha20-poly1305@openssh.com aes128-gcm@openssh.com aes256-ctr aes192-ctr aes128-ctr]"))
Expect(err).To(MatchError("ssh: handshake failed: ssh: no common algorithm for client to server cipher; client offered: [arcfour128], server offered: [aes128-gcm@openssh.com aes256-ctr aes192-ctr aes128-ctr]"))
Expect(fakeBBS.ReceivedRequests()).To(HaveLen(0))
})
})
Expand Down
2 changes: 1 addition & 1 deletion cmd/sshd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func configure(logger lager.Logger) (*ssh.ServerConfig, error) {
if *allowedCiphers != "" {
sshConfig.Config.Ciphers = strings.Split(*allowedCiphers, ",")
} else {
sshConfig.Config.Ciphers = []string{"chacha20-poly1305@openssh.com", "aes128-gcm@openssh.com", "aes256-ctr", "aes192-ctr", "aes128-ctr"}
sshConfig.Config.Ciphers = []string{"aes128-gcm@openssh.com", "aes256-ctr", "aes192-ctr", "aes128-ctr"}
}

if *allowedMACs != "" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/sshd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@ var _ = Describe("SSH daemon", func() {
Expect(process).NotTo(BeNil())
})

It("errors when the client doesn't provide one of the algorithm: 'chacha20-poly1305@openssh.com', 'aes128-gcm@openssh.com', 'aes256-ctr', 'aes192-ctr', 'aes128-ctr'", func() {
Expect(dialErr).To(MatchError("ssh: handshake failed: ssh: no common algorithm for client to server cipher; client offered: [arcfour128], server offered: [chacha20-poly1305@openssh.com aes128-gcm@openssh.com aes256-ctr aes192-ctr aes128-ctr]"))
It("errors when the client doesn't provide one of the algorithm: 'aes128-gcm@openssh.com', 'aes256-ctr', 'aes192-ctr', 'aes128-ctr'", func() {
Expect(dialErr).To(MatchError("ssh: handshake failed: ssh: no common algorithm for client to server cipher; client offered: [arcfour128], server offered: [aes128-gcm@openssh.com aes256-ctr aes192-ctr aes128-ctr]"))
Expect(client).To(BeNil())
})
})
Expand Down