Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Openssl error 0x02001005 and 0x2006D002 on Windows?

I'm trying to convert a .cer cert to a .p12 one using opensll.

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

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.

2) Copied the cert file I want to work with to the bin folder in the install location.

3) Entered the command at the top of this post

like image 778
dubbeat Avatar asked Jan 21 '23 03:01

dubbeat


2 Answers

I had the same problem. I resolved with the above answer.

Just type depending on 32 o 64 bits:

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

or

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

Thanks.

like image 151
malcubierre Avatar answered Jan 29 '23 03:01

malcubierre


 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?

like image 24
The Archetypal Paul Avatar answered Jan 29 '23 03:01

The Archetypal Paul