将.keystore转换为.jks以签名APK [英] Convert .keystore to .jks to sign apk
问题描述
我有一个Android应用程序,我正在尝试使用quixxi.com保护它,但是它要求我再次对该应用程序进行签名.但是要做到这一点,它必须使用.jks文件,但是我的密钥库是.keystore
I have an android app that I am trying to protect using quixxi.com however it requires me to sign the app again. But to do this it has to use .jks files but my keystore is .keystore
我正在C#和Visual Studio 2017中使用Xamarin.Android
I am using Xamarin.Android in C# with Visual Studio 2017
有什么办法解决这个问题吗?
Is there any way around this?
推荐答案
如果您使用Java梯形符号对Android应用(无论是否基于Xamarin)进行签名,则您使用的XXX.keystore
的几率是99.999%用于签署您的Xamarin.Android
应用程序是
已经是JKS格式,而不是PKCS12格式.
If you are using a Java keystone to sign your Android apps (Xamarin-based or not) then the odds are 99.999% that the XXX.keystore
that you are using to sign your Xamarin.Android
apps is
already in JKS format and not PKCS12 format.
一种快速的检查方法是以RFC格式转储您的梯形失真并查看Keystore type:
字段.
A quick way of checking is to dump your keystone in RFC format and review the Keystore type:
field.
/usr/bin/keytool -list -rfc -keystore debug.keystore |grep "Keystore type"
输出:
Enter keystore password:
***************** WARNING WARNING WARNING *****************
* The integrity of the information stored in your keystore *
* has NOT been verified! In order to verify its integrity, *
* you must provide your keystore password. *
***************** WARNING WARNING WARNING *****************
Keystore type: JKS
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore debug.keystore -destkeystore debug.keystore -deststoretype pkcs12".
示例(未过滤):
/usr/bin/keytool -list -rfc -keystore sushi.keystore
输出:
Enter keystore password:
***************** WARNING WARNING WARNING *****************
* The integrity of the information stored in your keystore *
* has NOT been verified! In order to verify its integrity, *
* you must provide your keystore password. *
***************** WARNING WARNING WARNING *****************
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: androiddebugkey
Creation date: Aug 20, 2017
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIEeCTY/jANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJV
~~~~
KvHIbSHVBsryiyCwPJkXP6A=
-----END CERTIFICATE-----
*******************************************
*******************************************
如果您实际上需要将PKCS12类型存储转换为新的JKS密钥存储类型文件:
If you actually need to convert a PKCS12 type store to new JKS keystore type file:
keytool -importkeystore -srckeystore somekeystore.pkcs12 -destkeystore somenewkeystore.jks -deststoretype jks
这篇关于将.keystore转换为.jks以签名APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!