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