Generate a certificate for signing Android applications and certificates android
1. keytool command
1) which of the following commands are available for keytool in JDK?Keytool-helpView
2) this time, the keytool-genkeypair command is used to generate a signature and check the parameters of this command.Keytool-genkeypair-help
It is found that keytool-genkey and keytool-genkeypair have the same effect.
2. Use the command to generate a signature certificate at a time
1) generate a signature certificate and place it on disk D.
-Alias test
-Keypass testpwd
-Keyalg RSA
-Keysize 1024:
-Keystore d: \ test. keystore
-Storepass testpwd
-Dname "CN = jiangjh5, OU = da, O = lnv, L = beijing, ST = beijing, C = china"
# keytool -genkeypair -alias test -keypass testpwd -keyalg RSA -keysize 1024 -validity 20000 -keystore d:\test.keystore -storepass testpwd -dname "CN=jiangjh5,OU=da,O=lnv,L=beijing,ST=beijing,C=china"
2) query signature certificate information
# keytool -list -v -keystore d:\test.keystore -storepass testpwd
Finally, check the parameters in keytool-list.Keytool-list-help
Generally, you can use a certificate generation command to view the certificate.
If the password needs to be kept confidential, remove the password-related parameters in the command line and prompt you to enter the password for the corresponding item.