Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID

前端 未结 8 1902
天命终不由人
天命终不由人 2021-02-04 06:32

I am facing strange issue on chrome while debugging local ASP.NET application on chrome. I am not able to open localhost without https. With Https it\'s giving

相关标签:
8条回答
  • 2021-02-04 07:26

    Just figured out how to solve this! Click on the Debug tab in the top menu and click on Debug Properties (right below Options), then scroll down and uncheck Enable SSL. Now try debugging your application again and it should work! It may take a minute to load but it definitely solves the problem...

    0 讨论(0)
  • 2021-02-04 07:28

    I had similar problem when I tried to use my self signed certificate and run my xhtml app in browser under https and with tomcat. What I did:

    1. in java's RE dir (usually Program Files\Java\jre1.8.0_202\bin) there is keytool and in command line I used this:

      keytool -genkey -alias example -keyalg RSA -sigalg SHA256withRSA -keysize 2048 -validity 3650 -keystore "C:\yourdir\yourkeystore.jks" -ext san=dns:localhost,dns:yourdesktophostname,ip:127.0.0.1,ip:::1
      

    Answer questions to create certificate which is created for 10 years, SHA-2 and what Chrome needs more: san(SubjectAlternateName).

    1. I added below lines to tomcat's server.xml (usually Program Files\Apacha Software...\conf:

      <Connector port="yourportnumber" protocol="org.apache.coyote.http11.Http11NioProtocol"
                     maxThreads="150" SSLEnabled="true"
                     compression="on" scheme="https" secure="true"
                     keystoreFile="conf/yourkeystore.jks"
                     keystorePass="yourpassword"
                     SSLVerifyClient="none" SSLProtocol="TLSv1.2"/>
      

      Restart Tomcat.

    2. Open the localhost address in Chrome browser (https:\localhost:yourport). It will tell "Not secure" at left side of address line and https crossed out Click on it and in that window press on certificate (invalid). It opens the certificate window and press on Details tab and press on copy to file button. Create crt file as instructed.

    3. Open up Chrome Settings > Show advanced settings > HTTPS/SSL > Manage Certificates. Select Trusted Roots tab and import the crt file here. Edit this certificate and mark all check boxes.

    Restart Chrome

    0 讨论(0)
提交回复
热议问题