Create pfx-certificate


#1

I’m trying to create a password protected pfx-certifcate using putty. I’ve created a private key and public key for ssh which I used in putty. According to the instruction I will use both the public and private key to create a pfx-certificate with the script below. I’m a newbie at this and can someone tell me what I’m doing wrong? The script creates a file: certificate.pfx.

My domain is: mattesnille.se

I ran this command:
openssl pkcs12 -export -out mattesnille.pfx -inkey ~/ssl/keys/name-of-key.key -in ~/ssl/certs/name-of-certificate.crt

It produced this output:
Error opening private key /home/mattesni/ssl/key/ca053_12245_4a7250fd453940399e8307aa8ca68100.key
140518461319056:error:02001002:system library:fopen:No such file or directory:bss_file.c:402:fopen(’/home/mattesni/ssl/key/ca053_12245_4a7250fd453940399e8307aa8ca68100.key’,‘r’)
140518461319056:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:404:
unable to load private key

My hosting provider, if applicable, is: oderland.se

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): Cpanel 76.0.20


#2

Hi @robato

the link is wrong, openssl can’t find your file. In which directory do you run this command?

Another user

uses

openssl pkcs12 -export -out bundle.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -password pass:xxx

so your command looks good. It’s only a problem of finding the correct files.

PS: You have a wrong link ( https://check-your-website.server-daten.de/?q=mattesnille.se - mixed content and other checks):

script
	
	https://s.codepen.io/assets/libs/modernizr.js
	404
	Not Found
	1
	missing file

That file doesn’t exist, so something may not work.


#3

Dear @robato

This is the Let’s Encrypt community based support forum. Let’s Encrypt is a free Certificate Authority, which enables people to get a publicly accepted certificate which can be used for example for HTTPS, the secure form of HTTP. You know, the green lock icon in your browser when you surf to a secure website.

I’m not really sure how your question is related to Let’s Encrypt. This is not a general support forum for everything related to security or public key infrastructure.

Perhaps, if your question isn’t Let’s Encrypt related at all, it’s best if you ask your question on a forum specifically for “general” questions, like https://stackoverflow.com/


#4

Thanks for your reply, I removed the / infront of the path and now it’s working.


closed #5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.