Windows 上的 Openssl 错误 0x02001005 和 0x2006D002?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4106035/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Openssl error 0x02001005 and 0x2006D002 on Windows?
提问by dubbeat
I'm trying to convert a .cer cert to a .p12 one using opensll.
我正在尝试使用 opensll 将 .cer 证书转换为 .p12 证书。
this is the command that I'm using
这是我正在使用的命令
C:\OpenSSL-Win32\bin>openssl x509 -inform der -in developer_identity.cer -out de
veloper_identity.pem
I'm conitunally getting an error and I don't know what it means. How can I figure out how to fix it.
我不断收到错误,我不知道这意味着什么。我怎样才能弄清楚如何解决它。
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:
EDIT 1
编辑 1
I'm not entirely sure if I'm using it correctly so I'll outline what I tried.
我不完全确定我是否正确使用它,所以我将概述我的尝试。
1) Downloaded openssl.exe and installed it.
1) 下载 openssl.exe 并安装它。
2) Copied the cert file I want to work with to the bin folder in the install location.
2) 将我要使用的证书文件复制到安装位置的 bin 文件夹中。
3) Entered the command at the top of this post
3)输入本帖顶部的命令
采纳答案by The Archetypal Paul
C:\OpenSSL-Win32\bin
Looks like it's trying to open a directory for reading? Does openssl work generally or is there some problem with its installation?
看起来它正在尝试打开一个目录进行阅读?openssl 正常工作还是安装有问题?
回答by malcubierre
I had the same problem. I resolved with the above answer.
我有同样的问题。我用上面的答案解决了。
Just type depending on 32 o 64 bits:
只需根据 32 或 64 位键入:
C:> set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
C:> 设置 OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
or
或者
C:> set OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg
C:> 设置 OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg
Thanks.
谢谢。
回答by Jeff
Not sure if this is still an open issue for you or not, but I just solved this for myself.
不确定这对您来说是否仍然是一个悬而未决的问题,但我只是为自己解决了这个问题。
From a Windows command prompt:
从 Windows 命令提示符:
C:\> set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
回答by Artur K?dzior
How about adding argument:
如何添加参数:
-config <full_path_to_the_openssl_config_file>
for example:
例如:
-config c:\OpenSSL-Win3\bin\openssl.cfg
so your command looks like this:
所以你的命令看起来像这样:
openssl x509 -inform der -in developer_identity.cer -out developer_identity.pem -config c:\OpenSSL-Win3\bin\openssl.cfg
回答by Tyler Montney
I don't understand why everyone suggests changing your Environment Variables. For me, it was already set. Perhaps the older versions didn't? I guess double check it's set right. Either way, I was unable to use openssl at all. Restarting Windows after installation solved the issue.
我不明白为什么每个人都建议更改您的环境变量。对我来说,它已经设置好了。也许旧版本没有?我想仔细检查它是否设置正确。无论哪种方式,我都无法使用 openssl。安装后重新启动 Windows 解决了该问题。
回答by Lasitha
I solved the problem by moving the openssl directory to the root of C: drive and setting the env variable.
我通过将 openssl 目录移动到 C: 驱动器的根目录并设置 env 变量解决了这个问题。