且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android证书已过期

更新时间:2023-10-17 13:12:34

也许(但我从来没有测试过)你可以用相同的公钥/私钥重新生成证书。如果它不工作,不幸的是我认为你将不得不生成一个新的证书。不要忘记在非常大的天数内添加 -validity< valdays> 选项。您还必须按照此处的说明更改软件包名称



根据@KIDdAe评论(见下文),Google会验证证书的SHA1指纹,而不仅仅是具有公钥的证书签名。因此,使用相同的密钥重新创建新证书是无用的,因为该新证书的SHA1将不同于初始证书。


I currently have an error message when signing my app, saying that the certificate is expired (not the debug one). (I know that is surprising since Android certificate should be available many years !). I can't create a new certificate because I get an error when updating my apk on the PlayStore (certificate of the apk have to be the same as the previous one)

Is it even possible to renew my keystore ?

Is the only possiblity create a new application ?

Maybe (but I never tested) you can regenerate a certificate with the same couple public/private keys. If it does not work, unfortunately I think you will have to generate a new certificate. Do not forget to add the -validity <valdays> option with a very large number of days. You will also have to change the package name as explained in this blog post.

UPDATE

According to @KIDdAe comment (see below), Google verifies the SHA1 fingerprint of the certificate and not only the certificate signature with the public key. Therefore recreating a new certificate with the same key is useless since the SHA1 of that new certificate will differ from the initial one.