mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 05:26:03 +03:00
[GH-ISSUE #161] Chrome 58+: NET::ERR_CERT_COMMON_NAME_INVALID when using generated cert #101
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bcjordan on GitHub (May 17, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/161
Browser: Google Chrome 74.0.3729.157 (Official Build) (64-bit) (cohort: Stable)
OS: Windows 10 OS Build 17134.765
Looks like an issue which begun with Chrome 58. Is there a recommended workaround that still make use of
mkcert's wonderful simple UX? :)Repro Steps
Make and install cert:
choco install mkcertmkcert -installRun web server and visit webpage:
cross-env NODE_ENV=development webpack-dev-server -d --hot --config webpack.config.js --watch --https --cert=C:\Users\myuser\AppData\Local\mkcert\rootCA.pem --key=C:\Users\myuser\AppData\Local\mkcert\rootCA-key.pemExpected: page loads OK with green lock
Actual:
NET::ERR_CERT_COMMON_NAME_INVALIDerror (see below)@FiloSottile commented on GitHub (Jun 1, 2019):
You are using the root CA (
rootCA.pem) as a server certificate, which is not going to work.You need to generate a new certificate for the hostname you are going to use, like
mkcert localhost.@anthonyxwatson commented on GitHub (Mar 6, 2023):
I'm seeing this when I use a wildcard certificate, with expanded message:
And the internet seems to think this is because Chrome wants the site name in the Subject Alternative Name.
https://serverfault.com/questions/559537/wildcard-certificate-causes-warning-on-google-chrome-only
I don't see in documentation for mkcert how to set the Subject Alternative Name to test if this fixes it, but wanted to mention all of this as this is the only issue for the repo that mentions the
ERR_CERT_COMMON_NAME_INVALIDerror.@noe commented on GitHub (Jun 26, 2023):
I am also having this problem with a wildcard certificate.
@renatofrota commented on GitHub (Feb 11, 2024):
*.localhostis a 2nd level wildcard, which is not accepted, since it's technically the same as creating a cert for*.com.however, there's a workaround for localhost wildcards, see https://github.com/FiloSottile/mkcert/issues/383#issuecomment-1937455068