I want to load a self-signed certificate created by OpenSSL to the local windows cert storage.
OpenSSL: 1.0.1l
OS: Windows 7 N
I created the certificate with the OpenSSL library and used the following commands:
openssl genrsa -des3 -out mykey.key 2048
openssl req -new -key mykey.key -out mycert.crt
Now i tried to load the certificate into the storage via mmc.exe
but it failed for the following reason:
"The file type not identifiable. Choose another file"
(It's not the original text because I am not using english on my OS.)
I tried this with every "acceptable" file type.
So my thoughts were that Windows wants the key and the cert merged together. I don't know how certificates in Windows getting handled internally. (I know it's bullshit to provide private key in a certificate but i just kept trying.)
So i tried this to merge the files: (According to this post.)
openssl pkcs12 -inkey mykey.key -in mycert.crt export -out outputfile.crt/pkcs ...
But then the following error occurred:
unable to load certificates
Seems not working. Any suggestions how I can load certificate the local storage?
Also I would like to know if its possible to create a machine-certificate (PeterPan-PC
or 192.168.2.1
instead of the Windows username (PeterPan
)) with OpenSSL?
UPDATE:
With the following command a certificate request
was created:
openssl req -new -key mykey.key -out mycert.crt
By using the following command, a self-signed certificate
will be created and the issue is solved:
openssl req -new -x509 -key mykey.key -out mycert.crt -days 365