go.crypto/ssh: add workaround for broken port forwarding in

OpenSSH 5.

Tested with OpenSSH_5.9

R=agl, dave
CC=golang-dev
https://golang.org/cl/11921043
This commit is contained in:
Han-Wen Nienhuys
2013-07-26 14:37:37 -04:00
committed by Adam Langley
parent eb19e229bd
commit 2d394e3025
4 changed files with 74 additions and 32 deletions
+16
View File
@@ -0,0 +1,16 @@
package ssh
import (
"testing"
)
func TestAutoPortListenBroken(t *testing.T) {
broken := "SSH-2.0-OpenSSH_5.9hh11"
works := "SSH-2.0-OpenSSH_6.1"
if !isBrokenOpenSSHVersion(broken) {
t.Errorf("version %q not marked as broken", broken)
}
if isBrokenOpenSSHVersion(works) {
t.Errorf("version %q marked as broken", works)
}
}