OpenSSL 在 PKCS12 导出期间挂起,“将‘屏幕’加载到随机状态" [英] OpenSSL hangs during PKCS12 export with "Loading 'screen' into random state"

查看:28
本文介绍了OpenSSL 在 PKCS12 导出期间挂起,“将‘屏幕’加载到随机状态"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 OpenSSL(不是 makecert)生成自签名 SSL 证书,用于 IIS.

I am generating a self-signed SSL certificate with OpenSSL (not makecert), for use in IIS.

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '//CN=myhost'

(双斜线是正确的.没有它,上面的命令就不能工作.)

(The double slash is correct. The command above does not work without that.)

openssl pkcs12 -export -out key.pfx -inkey key.pem -in cert.pem -name 'myhost'

第一个命令运行成功完成.然而,第二个卡住了

The first command runs completes successfully. However the second get stuck with

将屏幕"加载到随机状态 -

Loading 'screen' into random state -

我使用的是 Windows 版 Git (2.6.3) 附带的 OpenSSL (1.0.2d).有人遇到同样的问题吗?

I am using OpenSSL (1.0.2d) that comes with Git for Windows (2.6.3). Anyone experiences the same issue?

澄清: 问题 如何修复无法写入‘随机状态’"在 openssl 中描述了不同的 - 编写 .rnd 文件的问题.这里的问题似乎是生成随机状态.(并且仅在第二个命令中.)

Clarification: Question How to fix "unable to write 'random state' " in openssl describes different -- problem with writing the the .rnd file. Here the problem seems to be generating the random state. (And only in the second command.)

推荐答案

请尝试添加winpty在oppenssl之前:

Please try to add winpty before oppenssl:

winpty openssl ...

或者您可以运行由 winpty 包装的新 bash:

or you can run a new bash wrapped by winpty:

winpty bash

在 windows 控制台中,终端输入/输出存在一些问题,因此如果某些软件需要 unix 终端行为,winpty 可以提供帮助.

In the windows console, there is some problem with terminal input/output so winpty can help if some software requires unix terminal behavior.

winpty 帮助我在这种环境下运行 openssl:

winpty helped me to run openssl in this environment:

git version 2.7.3.windows.1
OpenSSL 1.0.2g  1 Mar 2016

这篇关于OpenSSL 在 PKCS12 导出期间挂起,“将‘屏幕’加载到随机状态"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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