Root certificate
1. Establish the CA working directory
mkdir CA
CD CA
2. Generate the CA private key
OpenSSL genrsa-out Ca-key.pem 1024
3. Generate a certificate to be signed
OpenSSL req-new-out Ca-req.csr-key Ca-key.pem
Ca-cert.pem is the CA root certificate, which can be issued to the client and imported as the root certificate. Private key Changeit
4. Self-signed with CA private key
OpenSSL x509-req-in ca-req.csr-out ca-cert.pem-signkey ca-key.pem-days 365
If a CA certificate is generated on request, the request file Certreq.txt is generated by the certificate requester. CA-Side Execute signature, generate certificate file 1.cer
OpenSSL x509-req-in c:\certreq.txt-out C:\1.cer-CA ca\ca-cert.pem-cakey ca\ca-key.pem-days 365-cacreateserial
Generate server Certificate
1. Create a private key
OpenSSL genrsa-out Server-key.pem 1024
2. Create a certificate request
OpenSSL req-new-out Server-req.csr-key Server-key.pem
4. Export the certificate to a browser-supported. P12 format, password Changeit
OpenSSL pkcs12-export-clcerts-in Server-cert.pem-inkey server-key.pem-out server.p12
4. Export the certificate to a browser-supported. P12 Format:
OpenSSL pkcs12-export-clcerts-in Client-cert.pem-inkey client-key.pem-out client.p12
Password: Changeit
To generate a JKs file from a CA certificate
Keytool-keystore truststore.jks-keypass 123456-storepass 123456-alias ca-import-trustcacerts-file ~/ca/ca-cert.pem
Import Certificate
Import Ca-cert.p12 as a trusted root certificate in the client browser, CLIENT.P12 as a personal certificate
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.