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

crypto/tls: remote error: handshake failure #13734

Closed
webluoye opened this issue Dec 26, 2015 · 1 comment
Closed

crypto/tls: remote error: handshake failure #13734

webluoye opened this issue Dec 26, 2015 · 1 comment

Comments

@webluoye
Copy link

@webluoye webluoye commented Dec 26, 2015

use crypto/tls connect to server with self-signed certificate handshake failure

go version: go version go1.5.2 darwin/amd64
os: osx 10.10

code:
cert, err := tls.LoadX509KeyPair(crtPath, keyPath)
tlsConfig = tls.Config{Certificates: []tls.Certificate{cert}, ClientAuth: tls.VerifyClientCertIfGiven, InsecureSkipVerify: true}
ladd, lerr := net.ResolveTCPAddr("tcp", ClientIp+":0")
radd, rerr := net.ResolveTCPAddr("tcp", server+":"+port)
ipConn, err := net.DialTCP("tcp", ladd, radd)
conn = tls.Client(ipConn, tlsconfig)
errObj = conn.Handshake()

this line get error // remote error: handshake failure

use openssl test is successful

openssl s_client -connect ote.gtld.knet.cn:700 -cert certs/certificate.pem -key certs/key.pem.unencrypted -state

SSL handshake has read 2307 bytes and written 940 bytes

New, TLSv1/SSLv3, Cipher is EDH-DSS-DES-CBC3-SHA
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : EDH-DSS-DES-CBC3-SHA
Session-ID: 567E50D41A2972656F463FC3600B6CED851138969EF9F2599268ED0572AE7315
Session-ID-ctx:
Master-Key: 565E6B07A8DFF230165F0CABFAA0ABF2E95C630994E64E2DB9AC7F7B7963F8B623010F0ED024D22262E7766170E88094
Key-Arg : None
Start Time: 1451118804
Timeout : 300 (sec)
Verify return code: 19 (self signed certificate in certificate chain)


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

@minux

This comment has been minimized.

Copy link
Member

@minux minux commented Dec 26, 2015

@minux minux closed this Dec 26, 2015
@mikioh mikioh changed the title crypto/tls : remote error: handshake failure crypto/tls: remote error: handshake failure Dec 26, 2015
@golang golang locked and limited conversation to collaborators Dec 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.