0

For my project, I need to add a self-assigned certificate to the trusted CA list so that browsers treat my server as secure connection. I have already produced the certificate using OpenSSL. Now, I need to add to the CA list. I tried to add the certificate manually by this command found from another question

sudo cp my.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates

But both Mozilla and Chrome still showing the connection as insecure. I will be grateful if anyone can guide me on how I can do this programmatically in JAVA/python/C/C++ or any other language.

screenshot from chrome

Masudul Hasan
  • 137
  • 2
  • 17
  • Programmatically trusting self-signed certificates (or any certificate for that matter) is a huge security risk. Don't do this! If you have your project hosted with a domain name, [Let's Encrypt](https://letsencrypt.org/) is literally free and trusted by most vendors. Use this instead. – Hoppeduppeanut Apr 17 '19 at 23:03
  • Hi, I am doing this for internet security course. I know that its very risky but that was my end goal. Anyway thanks for the suggestion. – Masudul Hasan Apr 17 '19 at 23:55
  • https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate – mnistic Apr 18 '19 at 10:35

0 Answers0