Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
crypto/tls: connection read no data without error from server side #5300
What steps will reproduce the problem? If possible, include a link to a program on play.golang.org. 1. start a tls server writing in go with tls pkg 2. connect the server using a client built with openssl 3. send something to server What is the expected output? client's data is received or error occured. What do you see instead? Server got two read event. The former returns no data or error. The latter gets the data that client sent before. Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? OSX Lion/Linux-2.6.32/Linux-3.0 Which version are you using? (run 'go version') go1.0.3 and go1.1beta2 Please provide any additional information below.  go server: http://play.golang.org/p/N_d4hjcRft  commands to generate server key pair: openssl genrsa 1024 > srv.key openssl req -new -x509 -nodes -sha1 -days 365 -key srv.key > srv.cer  client: openssl: $ echo -n "hello" | openssl s_client -connect 127.0.0.1:8080 -tls1 python: import socket import ssl s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('localhost', 8080)) ss = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1) ss.write('hello') ss.close()
I believe this is a duplicate of issue #5309. After some discussion it was determined that Read can return 0, nil and this is not an error. Further diagnosis on issue #5309 showed that certain ciphers would cause this to happen as a side effect of the BEAST mitigation.
Status changed to Duplicate.
Merged into issue #5309.
This issue was closed.