PeterMosmans / openssl

'Extra featured' OpenSSL with ChaCha20 and Poly1305 support
https://onwebsecurity.com/pages/openssl.html
Other
92 stars 18 forks source link

s_client exits after establishing connection #48

Closed dcooper16 closed 7 years ago

dcooper16 commented 7 years ago

Hi Peter,

I was trying to use your 1.0.2-chacha branch with testssl.sh, but it wasn't working for tests that require s_client to keep the connection open after establishing it. For example:

printf "$GET_REQ11" | $OPENSSL s_client $1 -quiet $BUGS -connect $NODEIP:$PORT $PROXY $addcmd >$TMPFILE 2>$ERRFILE &

I tried to find the source of the problem, and it seems to be the commit made on December 8, 2016, "Add Postgres support to s_client -starttls." In particular, the problem seems to be the "break;" statement added at line 2202 of apps/s_client.c. I deleted that one line and that seemed to fix the problem for me. However, I've only tested it against an HTTP server, so I don't know whether there was a reason that "break" statement was added, perhaps related to starttls.

Thanks,

David

PeterMosmans commented 7 years ago

Hi David,

Thanks for the feedback, that looks like a superfuous break indeed. I'm going to fix that one, and run some tests before deploying.

Should you have any other bugreports, keep 'em coming :wink:

Cheers,

Peter