I know... it's another one about certificate but perhaps you'll need this like I did.
If you follow this blog, you know I'm in need for a +30years certificate.
Problem
Flash Builder wizard generate 25 years certificate only
Solution
generate the certificate myself!
Again, thanks to keytool :
keytool.exe -genkey -keyalg RSA -storetype pkcs12 -alias <your_key_alias> -keystore <certificate_file>.p12 -validity 12000
Enter your password when requested only and fill the questions to complete
Note the -validity value is waiting for a number of days (not years!) so 12000 is about 32 years
Following previous post, if you lost your certificate file, you have 2 problems
1/ you won't be able to update your APK on the market anymore
2/ you are unable to retrieve details about the certificate used
While there is NOTHING to do for the first problem, there is a way to retrieve the certificate information.
Coming with jdk, you should use jarsigner :
jarsigner.exe -verify -certs -verbose <app>.apk
For each file of the apk, it will give you something similar to
X.509, CN=WillNa, OU=, O=, C=FR
[certificate is valid from 19/12/10 08:38 to 19/12/35 08:38]
this is the certicate details available.
Some days ago, one of my distributors asked me a package with a 30 years long certificate. I was pretty sure my current package was long enought but I didn't remember how much so I looked for a way to get it from this cryptic p12 file.
Be sure you have a jdk and not a jre installed else keytool won't be available.
The command to read information from a .p12 certificate is
keytool -list -keystore <certificate_file>.p12 -storetype pkcs12 -v
the magic option is -v
This way you could see the full informations
My p12 was 25 years long, it seems Google asks 30 years long now
Warning : it's not possible to update the certificate, the only way is to create a new one with the same informations and 30 years validity.
Sadly, doing this cancels the update system of Android.
Current users won't be able to update your app with the previous certificate, they have to delete and redownload it.
So backup and double backup your certificate !