The OpenSSL tool was planted on the OpenSSL, and after configuring the environment variable, execute the following command:
Create a root certificate and sign it with a self-signed signature
Create private key
OpenSSL genrsa-out Root/root-key.pem 1024
Create a certificate request
OpenSSL req-new-out Root/root-req.csr-key Root/root-key.pem
Self-signed root certificate
OpenSSL x509-req-in root/root-req.csr-out root/root-cert.pem-signkey root/root-key.pem-days 3650
Export the root certificate to the. P12 (PKCS12) format supported by the browser
OpenSSL pkcs12-export-clcerts-in Root/root-cert.pem-inkey root/root-key.pem-out root/root.p12
Create a server certificate and sign it with a root certificate
Create private key
OpenSSL genrsa-out Server/server-key.pem 1024
Create a certificate request
OpenSSL req-new-out Server/server-req.csr-key Server/server-key.pem
Signing a server certificate
OpenSSL x509-req-in server/server-req.csr-out server/server-cert.pem-signkey server/server-key.pem-ca root/ Root-cert.pem-cakey Root/root-key.pem-cacreateserial-days 3650
Export the client certificate to the. P12 (PKCS12) format supported by the browser
OpenSSL pkcs12-export-clcerts-in Server/server-cert.pem-inkey server/server-key.pem-out server/server.p12
Create a client certificate and sign it with a root certificate
Create private key
OpenSSL genrsa-out Client/client-key.pem 1024
Create a certificate request
OpenSSL req-new-out Client/client-req.csr-key Client/client-key.pem
Sign a customer Certificate
OpenSSL x509-req-in client/client-req.csr-out client/client-cert.pem-signkey client/client-key.pem-ca root/ Root-cert.pem-cakey Root/root-key.pem-cacreateserial-days 3650
Export the client certificate to the. P12 (PKCS12) format supported by the browser
OpenSSL pkcs12-export-clcerts-in Client/client-cert.pem-inkey client/client-key.pem-out client/client.p12
Import the root certificate into the Truststore
Keytool-import-v-trustcacerts-storepass password-alias root-file root-cert.pem-keystore ROOT.JKSV
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.