查看jks签名库里的签名信息:
keytool -v -list -keystore keystore.jks
更改别名:
keytool -changealias -keystore my.jks -alias myalias -destalias otheralias
删除别名:
keytool -delete -alias myalias -keystore my.jks -storepass jkspassword
查看.apk包里的签名详细:
jarsigner -verify -verbose -certs app-release.apk
通过命令生成密钥库和别名
keytool -genkey -alias myalias -keyalg RSA -keystore my.jks -keysize 2048 -validity 9125 -dname "CN=FirstAndLastName, OU=OrganizationalUnit, O=Organization, L=CityOrLocality, ST=StateOrProvince, C=CountryCode, EMAILADDRESS=email@gmail.com"
----注:-keyalg:加密算法 -keysize:加密位数 -validity:有效期(天) -dname:证书详细信息
导出证书:
keytool -export -alias myalias -keystore my.jks -file myalias.crt -storepass jkspassword
打印证书信息:
keytool -printcert -file myalias.crt
将证书导入到密钥库并生成别名
keytool -import -alias myotheralias -file myalias.crt -keystore my1.jks -storepass jkspassword
修改别名里的信息,注MD5的值也会同时被修改
keytool -selfcert -alias myalias -keypass aliaspassword -keystore my.jks -storepass jkspassword -dname "CN=FirstAndLastName1, OU=OrganizationalUnit1, O=Organization1, L=CityOrLocality1, ST=StateOrProvince1, C=CountryCode1, EMAILADDRESS=email1@gmail.com"
网友评论