Getting Chrome to accept self-signed localhost certificate

后端 未结 30 3358
小蘑菇
小蘑菇 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:03

    When clicking the little crossed out lock icon next to the URL, you'll get a box looking like this:

    enter image description here

    After clicking the Certificate information link, you'll see the following dialog:

    enter image description here

    It tells you which certificate store is the correct one, it's the Trusted Root Certification Authorities store.

    You can either use one of the methods outlined in the other answers to add the certificate to that store or use:

    certutil -addstore -user "ROOT" cert.pem
    
    • ROOT is the internal name of the certificate store mentioned earlier.
    • cert.pem is the name of your self-signed certificate.

提交回复
热议问题