VENKI.B
VENKI.B

Reputation: 53

Is android debug.keystore file valid for 30 years

I am new to android.Now i am trying to understanding signing apk file. I created one app and signed with self signed certificate(with private keystore file) and every thing is fine. While i am trying to know more about debug.keystore ,i tried to sign apk with debug.keystore file when exporting apk in Eclips IDE. at the last step i observed that Certificate expires on Fri Sep 19 15:02:42 IST 2042. . But the file created on 26th Sep 2012. When i goggling observed that debug.keystore expired in 365 days. But my debug.keystore showing 30 years.Is it possible. I am confused. Can any one help me ,please clear my doubt.

Thanks in advance.

Upvotes: 2

Views: 5797

Answers (3)

Sunil Kumar
Sunil Kumar

Reputation: 7092

See the things

keytool -genkey -v -keystore debug.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 10000

Here the validity is 10000. So in that case it is not expire in 365 day.

Upvotes: 1

tsukimi
tsukimi

Reputation: 1645

Best to generate your own debug key that does not expire in one year and use that, otherwise you will have troubles updating your apps later.

keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 14000

Upvotes: 2

mvp
mvp

Reputation: 116058

There is no predetermined limit for expiration of certificates. Granted, most certificated issued by certification authorities are only valid for 1 year (365 days), but it does not have to be the case. Most certification authorities have expiration dates for their own CA certificates that are valid for 25 and more years.

If you are using self-signed certificate (which can be created using keytool or openssl), you can specify pretty much any expiration time. If we are talking about android debug.keystore, it most likely has some self-signed certificates which may default to 1 year expiration.

What you have seen (expiration in 2042) was most likely Android Test CA certificate.

Upvotes: 1

Related Questions