Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.8.3 darwin/amd64
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/code/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.8.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.8.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vd/th9v9qw93c3d2mb24ghf4q_r0000gn/T/go-build785283138=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
Decoding ECDSA certificate (fail)
https://play.golang.org/p/wHYxSA6JrN
Note: decoding this certificate using openssl x509 -in devCA.crt -text -noout produces correct output.
Decoding RSA certificate (success)
https://play.golang.org/p/fvcX76vbY5
What did you expect to see?
Return ok=true from certPool.AppendCertsFromPEM on decoding ECDSA certificate
What did you see instead?
asn1: structure error: tags don't match (6 vs {class:0 tag:16 length:247 isCompound:true}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} ObjectIdentifier @3
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version)?go version go1.8.3 darwin/amd64What operating system and processor architecture are you using (
go env)?What did you do?
Decoding ECDSA certificate (fail)
https://play.golang.org/p/wHYxSA6JrN
Note: decoding this certificate using
openssl x509 -in devCA.crt -text -nooutproduces correct output.Decoding RSA certificate (success)
https://play.golang.org/p/fvcX76vbY5
What did you expect to see?
Return
ok=truefromcertPool.AppendCertsFromPEMon decoding ECDSA certificateWhat did you see instead?