openssl hangs and does not exit

前端 未结 4 1251
失恋的感觉
失恋的感觉 2020-12-24 01:49

I am trying to use openssl to get a certificate, and it seems to keep hanging. I have done a lot of research but not all of the available options seem to work on Windows.

4条回答
  •  清歌不尽
    2020-12-24 02:14

    For reasons i do not completeley understand, echoing QUIT or quit\n into the input did not work in my case. I'm using MINGW64 with OpenSSL 1.0.2d on Windows 8.1, and i'm using openssl to get certificates from servers inside a bash script. However, just running the openssl command in background and waiting a bit worked for me:

    #!/bin/bash
    
    openssl s_client -connect my.server.com:443 -showcerts > output.txt 2>/dev/null &
    sleep 2
    

提交回复
热议问题