Description
- What version of Go are you using (
go version
)?
go version go1.7 linux/amd64
- What operating system and processor architecture are you using (
go env
)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/tv/go"
GORACE=""
GOROOT="/home/tv/src/go-1.7"
GOTOOLDIR="/home/tv/src/go-1.7/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/home/tv/tmp/go-build877219418=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
- What did you do?
The program in in https://play.golang.org/p/I8S80_1P1p gave a confusing error (#16834 created about the message itself). This issue digs into why he ended up with such a parsed certificate, and what should have happened instead.
The cert in that play snippet is from https://github.com/wbond/badtls.io specifically https://github.com/wbond/badtls.io/blob/master/certs/domain-match.crt
What seems to have happened is that the cert there is structured like seq(set(a=b, c=d, e=f))
instead of what I seem to be getting from elsewhere, seq(set(a=b), set(c=d), set(e=f))
. I may be very wrong about this, my asn.1 is 10 years rusty.
- What did you expect to see?
Hopefully, either
- Go crypto/tls client behavior matches old openssl behavior (seen in osx, debian jessie: https://gist.github.com/joneskoo/eff2607bab6c29d153b276938afc59ff ), and connection succeeds
or
- Go crypto/tls behaves more like openssl 1.0.2d and refuses that connection (this part is fine, and probably wiser, though I can't see anything in openssl changelog that would be the reason)
- BUT ALSO do something reasonable with RDN sequences where the set contains multiple values. Give an error or parse all the key-value pairs in every set. Right now, entries after the first are silently ignored:
go/src/crypto/x509/pkix/pkix.go
Line 67 in 7c5f33b
- What did you see instead?
Most of the subject RDN content discarded silently. Confusing error message. Behavior that differs from curl
on OS X and Debian Jessie.