<p dir="auto">use crypto/tls connect to server with self-signed certificate handshake failure</p>
<p dir="auto">go version:   go version go1.5.2 darwin/amd64<br>
os: osx 10.10</p>
<blockquote>
<p dir="auto">code:<br>
cert, err := tls.LoadX509KeyPair(crtPath, keyPath)<br>
tlsConfig = tls.Config{Certificates: []tls.Certificate{cert}, ClientAuth: tls.VerifyClientCertIfGiven, InsecureSkipVerify: true}<br>
ladd, lerr := net.ResolveTCPAddr("tcp", ClientIp+":0")<br>
radd, rerr := net.ResolveTCPAddr("tcp", server+":"+port)<br>
ipConn, err := net.DialTCP("tcp", ladd, radd)<br>
conn = tls.Client(ipConn, tlsconfig)<br>
errObj = conn.Handshake()</p>
</blockquote>
<p dir="auto">this line get error // remote error: handshake failure</p>
<p dir="auto">use openssl test is successful</p>
<p dir="auto">openssl s_client -connect ote.gtld.knet.cn:700 -cert certs/certificate.pem -key certs/key.pem.unencrypted -state</p>
<p dir="auto">SSL handshake has read 2307 bytes and written 940 bytes</p>
<p dir="auto">New, TLSv1/SSLv3, Cipher is EDH-DSS-DES-CBC3-SHA<br>
Server public key is 1024 bit<br>
Secure Renegotiation IS supported<br>
Compression: NONE<br>
Expansion: NONE<br>
SSL-Session:<br>
Protocol  : TLSv1<br>
Cipher    : EDH-DSS-DES-CBC3-SHA<br>
Session-ID: 567E50D41A2972656F463FC3600B6CED851138969EF9F2599268ED0572AE7315<br>
Session-ID-ctx:<br>
Master-Key: 565E6B07A8DFF230165F0CABFAA0ABF2E95C630994E64E2DB9AC7F7B7963F8B623010F0ED024D22262E7766170E88094<br>
Key-Arg   : None<br>
Start Time: 1451118804<br>
Timeout   : 300 (sec)<br>
Verify return code: 19 (self signed certificate in certificate chain)</p>
<p dir="auto">�<br>
KNET Co.,Ltd. EPP Server2015-12-26T08:33:25.53Z1.0enurn:ietf:params:xml:ns:domain-1.0urn:ietf:params:xml:ns:host-1.0urn:ietf:params:xml:ns:contact-1.0urn:ietf:params:xml:ns:secDNS-1.1urn:ietf:params:xml:ns:launch-1.0urn:ietf:params:xml:ns:rgp-1.0</p>
<p dir="auto">by <strong><a href="mailto:andreas@ionisiert.de">andreas@ionisiert.de</a></strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
cd
rm -rf go
hg clone -u weekly <a href="https://go.googlecode.com/hg/" rel="nofollow">https://go.googlecode.com/hg/</a> go/
cd go/src
./all.bash
go get code.google.com/p/goprotobuf/{proto,protoc-gen-go}
package code.google.com/p/goprotobuf/proto
        imports code.google.com/p/goprotobuf/proto: import "code.google.com/p/goprotobuf/proto": cannot find package
package code.google.com/p/goprotobuf/protoc-gen-go
        imports code.google.com/p/goprotobuf/protoc-gen-go: import "code.google.com/p/goprotobuf/protoc-gen-go": cannot find package

cd code.google.com/p/goprotobuf/proto
go build
go install
go install: no install location for _/home/aj/go/src/code.google.com/p/goprotobuf/proto

What is the expected output?
go get should work / fail with an error message pointing to the source of the problem.

What do you see instead?
a cryptic error message.

Which compiler are you using (5g, 6g, 8g, gccgo)?
amd64

Which operating system are you using?
linux

Which revision are you using?  (hg identify)
weekly 2012-03-04

Please provide any additional information below.

source of my problems: I had GOPATH set instead of GOROOT.
fixing that now everything is fine. but the error messsage doesn't
help to find out what is wrong and migth confuse new users.</pre>