A: The main content of this article is introduced
Download of CA certificate and introduction of the corresponding file
Deployment of CA certificates in Tomcat
CA certificate Deployment in spring boot
Deployment of self-signed certificates
II: Some of the content of the review
Self-signed certificates and the generation of CA certificates that are described in one of the HTTPS series
One of the important documents mentioned is: KeyStore file
Review what KeyStore is for:
KeyStore can be understood as a database that can store many groups of data.
Each group of data consists of the following two types of data:
A: Key entities (key entity)--keys (secret key) or private and paired public keys (with asymmetric encryption)
B: Trusted certificate Entity (trusted certificate entries)--only public key is included
So all we have to do now is deploy the KeyStore file to the server and it's OK.
Three: Let's start with the self-signed certificate in Server Configuration 1: Deployment for Tomcat servers
For a detailed configuration of the Tomcat server (version: 8.5.23), the following are detailed:
1): Convert the generated certificate file to a file in JKS format, the conversion command is as follows:
Keytool-importkeystore-srckeystore {path}\keystore.p12-destkeystore {path}\xx.jks-srcstoretype PKCS12- Deststoretype JKS
2): Create the Cert directory under the Tomcat installation directory and copy all downloaded files to the Cert directory
3): Locate the file Server.xml installed in the Tomcat directory, the general default path is in the Conf folder.
完整的配置如下,其中port属性根据实际情况修改:
Four: CA certificate deployment on the server side
Same as the self-signed certificate configuration.
Five: Run the server test HTTPS
In the spring boot environment, there is no need to add any additional code in addition to the above configuration.
Well, the important moment comes, run the server, enter the HTTPS URL
Since the visa book for example, display unsafe ah, but you can click "Advanced" and "continue to visit" to visit:
This digest from Yan home Big Little Blog: Http://blog.csdn.net/gary_yan
HTTPS Series II: SSL Certificate for HTTPS deployment on the server side, based on tomcat,spring boot