Use the built-in Java keytool command

Source: Internet
Author: User

Use the keytool command that comes with Java to generate it in the command line. 1. Generate the server-side Private Key kserver. keystore file keytool-genkey-alias serverkey-validity 1-keystore kserver. keystore 2. export the server-side security certificate keytool-export-alias serverkey-keystore kserver based on the private key. keystore-file server. crt 3. import the server certificate to the client's Trust KeyStore keytool-import-alias serverkey-file server. crt-keystore tclient. keystore 4. Generate the Client Private Key kclient. keystore file keytool-genkey-alias clientkey-validity 1-keystore kclient. key Store 5. export the Client Security Certificate keytool-export-alias clientkey-keystore kclient based on the private key. keystore-file client. crt 6. import the client certificate to the keytool-import-alias clientkey-file client in the Trust KeyStore on the server side. crt-keystore tserver. files generated by keystore are divided into two groups, which are saved on the server: kserver. keystore tserver. save the keystore client: kclient. keystore tclient. kyestore. Keytool-import-alias serverkey-file server. crt-keystore tclient. bks-storetype BKS-provider org. bouncycastle. jce. provider. bouncyCastleProvider keytool-genkey-alias clientkey-validity 1-keystore kclient. bks-storetype BKS-provider org. bouncycastle. jce. provider. bouncyCastleProvider keytool-import-alias clientkey-file android. crt-keystore kclient. bks-storetype BKS keytool-import-alias csswebkey-file ca. crt-keystore kclient. bks-storetype BKS keytool-import-alias cakey-file ca. crt-keystore tclient. bks-storetype BKSkeytool-import-alias serverkey-file server. crt-keystore tclient. bks-storetype BKS keytool-import-alias serverkey-file server. crt-keystore tclient. bks-storetype BKS keytool-import-alias serverkey-file server. crt-keystore client. bks-storetype BKS-provider org. bouncycastle. jce. provider. bouncyCastleProvider

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.