On Thu, Oct 3, 2013 at 5:14 PM, Jeff Trawick <traw...@gmail.com> wrote:
> E.g., run > > echo GET / | openssl s_client -connect host:port > > It does the handshake then stalls until you press a key (which will be > left unused in the buffer when openssl exits), then it sends the input. I > guess the kbhit() in the s_client code is what is waking it up. > > I've played around with various command-line arguments but haven't found > one to bypass the issue. > > (Windows Server 2008R2, openssl 1.0.1e bindist) > > -- > Born in Roswell... married an alien... > http://emptyhammock.com/ > Adding "#undef OPENSSL_SYS_MSDOS" before MAIN() in s_client.c avoids this problem if you're willing to rebuild. I don't have time at present to see what the real fix is. e_os2.h has this logic (seemingly for a very long time), which undermines the use of some Windows-specific code in s_client.c (specifically, calls to WaitForSingleObject()): /* Anything that tries to look like Microsoft is "Windows" */ #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WINDOWS # ifndef OPENSSL_SYS_MSDOS # define OPENSSL_SYS_MSDOS # endif #endif -- Born in Roswell... married an alien... http://emptyhammock.com/