Getting Chrome to accept self-signed localhost certificate

后端 未结 30 2918
小蘑菇
小蘑菇 2020-11-21 11:30

I have created a self-signed SSL certificate for the localhost CN. Firefox accepts this certificate after initially complaining about it, as expected. Chrome and IE, however

30条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-21 12:06

    UPDATE 11/2017: This answer probably won't work for most newer versions of Chrome.

    UPDATE 02/2016: Better Instructions for Mac Users Can be Found Here.

    1. On the site you want to add, right-click the red lock icon in the address bar:enter image description here

      1. Click the tab labeled Connection, then click Certificate Information

      2. Click the Details tab, the click the button Copy to File.... This will open the Certificate Export Wizard, click Next to get to the Export File Format screen.

      3. Choose DER encoded binary X.509 (.CER), click Next

      4. Click Browse... and save the file to your computer. Name it something descriptive. Click Next, then click Finish.

      5. Open Chrome settings, scroll to the bottom, and click Show advanced settings...

      6. Under HTTPS/SSL, click Manage certificates...

      7. Click the Trusted Root Certification Authorities tab, then click the Import... button. This opens the Certificate Import Wizard. Click Next to get to the File to Import screen.

      8. Click Browse... and select the certificate file you saved earlier, then click Next.

      9. Select Place all certificates in the following store. The selected store should be Trusted Root Certification Authorities. If it isn't, click Browse... and select it. Click Next and Finish

      10. Click Yes on the security warning.

      11. Restart Chrome.

提交回复
热议问题