Windows上的Openssl错误0x02001005和0x2006D002?

时间:2010-11-05 13:01:11

标签: windows openssl

我正在尝试使用opensll将.cer证书转换为.p12证书。

这是我正在使用的命令

C:\OpenSSL-Win32\bin>openssl x509 -inform der -in developer_identity.cer -out de
veloper_identity.pem

我正在犯错,我不知道这意味着什么。我怎样才能弄清楚如何解决它。

2104:error:02001005:system library:fopen:Input/output error:.\crypto\bio\bss_fil
e.c:163:fopen('C:\OpenSSL-Win32\bin','rb')
2104:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c
:168:
2104:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\con
f\conf_def.c:199:

编辑1

我不完全确定我是否正确使用它,所以我会概述我尝试的内容。

1)下载openssl.exe并安装它。

2)将我要使用的证书文件复制到安装位置的bin文件夹中。

3)在这篇文章的顶部输入命令

6 个答案:

答案 0 :(得分:5)

我遇到了同样的问题。我用上面的答案解决了。

只需键入32 o 64位:

C:>设置OPENSSL_CONF = C:\ OpenSSL-Win32 \ bin \ openssl.cfg

C:>设置OPENSSL_CONF = C:\ OpenSSL-Win64 \ bin \ openssl.cfg

感谢。

答案 1 :(得分:2)

 C:\OpenSSL-Win32\bin

看起来它正在尝试打开一个目录进行阅读? openssl是否正常工作或安装有问题?

答案 2 :(得分:1)

不确定这是否仍然是一个未解决的问题,但我刚刚为自己解决了这个问题。

从Windows命令提示符:

C:\> set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg

答案 3 :(得分:1)

添加参数怎么样:

-config <full_path_to_the_openssl_config_file>

例如:

-config c:\OpenSSL-Win3\bin\openssl.cfg

所以你的命令看起来像这样:

openssl x509 -inform der -in developer_identity.cer -out developer_identity.pem -config c:\OpenSSL-Win3\bin\openssl.cfg

答案 4 :(得分:0)

我不明白为什么每个人都建议改变你的环境变量。对我来说,它已经确定了。也许旧版本没有?我想仔细检查它是否正确。无论哪种方式,我根本无法使用openssl。安装后重新启动Windows解决了这个问题。

答案 5 :(得分:0)

我通过将openssl目录移动到C:驱动器的根目录并设置env变量来解决了该问题。