[openssl-dev] [openssl.org #4594] openssl s_client issue on windows platform

Oleg Kukartsev via RT rt at openssl.org
Tue Jun 28 15:18:27 UTC 2016


Guys,
There is an issue with openssl s_client described here:
http://stackoverflow.com/questions/25760596/how-to-terminate-openssl-s-client-after-connection
Basically, it prevents openssl s_client automation on windows platform.

And a similar question here:
http://stackoverflow.com/questions/19147280/how-do-you-pipe-echo-into-openssl

It works on Linux just fine, but not on windows.
I’ve tested it on windows server 2012 R2 SP1 with following openssl
versions:
OpenSSL 1.0.2f  28 Jan 2016
OpenSSL 1.0.2h  3 May 2016

Downloaded from here:
https://slproweb.com/products/Win32OpenSSL.html

To clarify:
A single command like this
openssl s_client -brief -servername some.dns.name -connect
192.168.68.160:443 <nul
waits for “any key” click (enter, esc, etc.)
If I run a batch with 10 commands like above, only 1 one will wait for key
click, all others will run right away, because a “key” is in the buffer
still, and openssl reads from pipe in fact (i.e. <nul )

And after running batch, “any key” I clicked will be interpreted by shell,
since openssl has never read it.

Here is speculation, why it might behave like this:
http://openssl.6102.n7.nabble.com/openssl-s-client-takes-over-30-seconds-to-complete-on-Windows-td45781.html
Dave Thompson-5
<http://openssl.6102.n7.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=74>
Jul
05, 2013; 9:19pm wrote why it might be happening:
I'll guess this is because WaitForSingleObject doesn't treat a diskfile or
full pipe as 'notified' (unlike a console), whereas Unix select() does
treat them as 'ready' (like a tty).

Let me know, if I need to clarify any further.
Thank you!
Oleg Kukartsev

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4594
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list