Getting Chrome to accept self-signed localhost certificate

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

    Filippo Valsorda wrote a cross-platform tool, mkcert, to do this for lots of trust stores. I presume he wrote it for the same reason that there are so many answers to this question: it is a pain to do the "right" thing for SubjectAltName certificates signed by a trusted root CA.

    mkcert is included in the major package management systems for Windows, macOS, and several Linux flavors. It is also mentioned in the Chromium docs in Step 4 of Testing Powerful Features.

    mkcert

    mkcert is a simple tool for making locally-trusted development certificates. It requires no configuration.

    $ mkcert -install
    Created a new local CA at "/Users/filippo/Library/Application Support/mkcert" 

提交回复
热议问题