How to get .crt and .key files from ? I just have .pem files


#1

Hi,
I installed successfully HTTPS on my site: I got ion my folder:

cert.pem
chain.pem
fullchain.pem
privkey.pem

My nodeJS requires that to run on HTTPs:
CRT and .KEY files

var ssl = {
ca: fs.readFileSync(’/etc/apache2/ssl/AlphaSSL.crt’),
cert: fs.readFileSync(’/etc/apache2/ssl/mysite.com.crt’),
key: fs.readFileSync(’/etc/apache2/ssl/mysite.com.key’)
};

Question : Where to get .crt and .key from ?


#2

According to the Node.js v5.3.0 Documentation it just accepts PEM files?

You do realize file extensions do not say everything about a file, right?


#3

The are just different “extensions” but are all essentially text files.

your key file (mysite.com.key) will be privkey.pem
your cert file (mysite.com.crt) will be cert.pem
your ca file ( AlphaSSL.crt in your example) will be chain.pem or fullchain.pem ( depending exactly what you need )