Android 签名证书

本文介绍了Android签名证书的生成与查看方法。生成签名证书使用keytool命令,需设置keystore密码、个人信息等;查看签名证书也可通过keytool命令,还能获取Base64格式的公钥证书。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值