Android 签名证书
Android 签名证书
2016-03-25
1、生成签名证书
keytool -genkey -v -keystore release.keystore -alias releasekey
-keyalg RSA -validity 1000
# 说明:
# -genkey 产生**
# -alias mykey 别名 mykey
# -keyalg RSA 使用RSA算法对签名加密
# -validity 1000 有效期限1000天
# -keystore demo.keystore
回答一下问题:
1、Enter keystore password: <-- 设置keystore密码-必须至少6个字符
2、What is your first and last name? <-- 输入你的名字
3、What is the name of your organizational unit? <-- 组织单位, 可以忽略
4、What is the name of your organization? <-- 组织, 可以忽略
5、What is the name of your City or Locality? <-- 城市
6、What is the name of your State or Province? <-- 省份
7、What is the two-letter country code for this unit? <-- 国家 中国缩写:CN
8、Is CN=ipod4g, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN correct?
[no]: yes <-- 输入 yes 确认
9、Generating 1,024 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 10,000 days
for: CN=ipod4g, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN
10、Enter key password for
(RETURN if same as keystore password): <-- 设置key密码,如与keystore密码相同,回车
[Storing android-release-key.keystore]
2、查看签名证书
keytool -list -v -keystore demo.keystore
keytool -list -rfc -keystore demo.keystore
(注:获取Base64格式的公钥证书,RFC 1421)
keytool -list -v -keystore demo.keystore -storepass xxxxxx