I would like to run an https C++ server from this source code.
I have followed up this website to generate the certificate:
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
which led to creation of four files:
server.crt
server.csr
server.key
server.key.org
Then, in my firefox browser, I go to preferences/advanced:
about:preferences#advanced
Then view certificate, your certificates, import.
But at the end, I face with an error and nothing happens:
This personal certificate can’t be installed because you do not own the corresponding private key which was created when the certificate was requested.
All necessary file including server.key are there.
What is the problem?
What should I do?



cat server.crt server.key > cert_and_key.pem. Or just add the key to the certificate, i.e.cat server.key >> server.crt. – Steffen Ullrich Jul 01 '17 at 12:27cert_and_key.pem:This personal certificate can’t be installed because you do not own the corresponding private key which was created when the certificate was requested.– ar2015 Jul 01 '17 at 12:32add exceptionbutton. – ar2015 Jul 01 '17 at 13:35authoritiestab as well. It does import the certificate but makes no effect. Firefox still gives warnings. – ar2015 Jul 04 '17 at 01:53