Can I use the same keystore file to sign two different applications?

前端 未结 7 1816
独厮守ぢ
独厮守ぢ 2020-11-27 04:10

I have to upload a new application, It\'s just the design that\'s a little different. Yesterday I generated the keystore file to sign application. Can I use the same?

7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 04:45

    I want to add some clarification here, because this question and the answers provided lead to confusion for me. It is crucial to understand what a keystore actually is.

    A keystore is just a means to securely store the public/private key pair which is used to sign your Android apks. So yes, you can use the same keystore to sign multiple apks, without a problem. You can also use the same alias (each alias is a certificate) to sign multiple apks, and it will work. It has security implications, however. If your single alias is compromised, then all of your apps will have been compromised.

    However, if you intend to sell the rights to your apps one day, then using the same alias for all of your apps may not be a good idea. However, using the same keystore, provided you use a different alias for each apk, may not necessarily be a bad option. I'm sure there is a way that you can move a certificate from one keystore to another, so that you can securely give the necessary keys for only that certificate to your buyer.

    To make it very clear, a keystore is just that, a storage medium for keys. It plays no actual part in the process of signing an apk, but only serves to store the keys which are actually used to sign the apk.

    References:

    Understanding keystore, certificates and alias

    https://www.digitalocean.com/community/tutorials/java-keytool-essentials-working-with-java-keystores

提交回复
热议问题