Home  >  Q&A  >  body text

java - After configuring https in Spring boot, how to use a self-made root certificate to access the browser without security prompts?

keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650, use this command to generate keystore.p12, import this keystore into the springboot root directory and then configure the configuration file , you can implement https request to access the project in the browser, but an unsafe prompt

will appear.

Then I want this security prompt not to appear, what should I do???

大家讲道理大家讲道理2712 days ago685

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-05-17 10:08:44

    This can be achieved. This is what you do with 12306 currently. I still remember when we first started using 12306, there was a tutorial on the official website that taught us how to import the certificate. So your question is definitely no problem according to your idea. The problem is:
    1. You need to let users know that access to your website requires a certificate. 2. You need to let users know how to import your certificate. 3. You Users need to be motivated to import certificates, such as: 12306 website

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-17 10:08:44

    There is no solution to this, the user must add an exception on the browser side, see here

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-17 10:08:44

    Let users add exceptions, or install your root certificate

    If you can create your own certificate so that any browser will not alert you, this is a serious security issue

    reply
    0
  • Cancelreply