openssl挂起,不退出 [英] openssl hangs and does not exit

查看:482
本文介绍了openssl挂起,不退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用openssl获取证书,它似乎保持挂起。我已经做了很多研究,但不是所有的可用选项似乎在Windows上工作。

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.

openssl s_client -showcerts -connect google.com:443 > cert.txt

我试过这个:

openssl s_client -connect xyz:443 < quit.txt > cert.txt

其中 quit.txt quit\\\

来自 http:/ /bytes.com/topic/php/answers/8802-automate-openssl-s_client-command-batch-php-script

Where quit.txt contains "quit\n" from http://bytes.com/topic/php/answers/8802-automate-openssl-s_client-command-batch-php-script

这没有用。我还查看了 Openssl s_clinet -connect脚本。强制退出帮助

That did not work. I also looked at Openssl s_clinet -connect scripting. Force quit help

我也尝试过 -prexit

我也看过这个,也不能让它工作:
http://serverfault.com/questions/139728/how-to-download-ssl-certificate-from-a-website

I have also looked into this as well and can't get it working: http://serverfault.com/questions/139728/how-to-download-ssl-certificate-from-a-website

我做得很好!我设法做一些我认为是不可能的事情,一个简单的东西,像这个错误设法阻止 :(

I was doing so well! I managed to do something that I thought would be impossible and a simple thing like this bug managed to stop me for the time being :(

推荐答案

看起来像Windows的一些OpenSSL发布期望额外的按键,独立的标准输入Quit.txt正确地管道到openssl的STDIN(服务器接收QUIT命令),但没有发生,直到

It looks like some OpenSSL distributions for Windows are expecting an additional keypress, independant of standard input. Quit.txt gets correctly piped into openssl's STDIN (the server receives QUIT command), but nothing happens until you press any key.

这个问题在 Cygwin的版本中不存在OpenSSL。不幸地,Cygwin的基本安装需要大约100 MB的磁盘空间,但您可以尝试只提取openssl.exe和所需的库。

This problem does not exist in Cygwin's version of OpenSSL. Unfortunatly base installation of Cygwin takes about 100 MB of disk space, but you can try to extract only openssl.exe and required libraries.

此方法的工作原理: p>

This method works:

echo QUIT | c:\cygwin\bin\openssl.exe s_client -showcerts -connect google.com:443 > cert.txt

这篇关于openssl挂起,不退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆