Jarsigner - 签署者证书尚未生效(AIR应用程序代码签名将在Google Play上发布)

时间:2013-06-26 03:04:13

标签: air osx-snow-leopard google-play keytool jarsigner

我使用Self-Signed CertificateMac OS中创建了Keychain Access,以用作AIR Application的证书。在Flash Builder 4.6导出我的应用的发布版本后,我通过执行以下命令使用apk验证了我的jarsigner

jarsigner -verify -verbose -certs myapp.apk

然后,返回以下消息:

jar verified.

Warning: 
This jar contains entries whose signer certificate is not yet valid. 

可以在Google Play上发布此应用吗? 如果可能,如何验证我的自签名证书?

1 个答案:

答案 0 :(得分:0)

我的问题的根本原因:由于Google Play要求证书在October 22, 2033之后过期,我已将系统日期更改为提前日期。

Keychain Access证书助理有效期的有效值为20年,因此如果我要创建新证书,它将于2033年6月26日到期,但未达到要求。

A validity period for an X509 certificate is the number of days the certificate
is valid from the time it is issued. Certificates issued by Certificate Assistant
have a maximum validity period of 20 years.

使用此证书进行我的航空应用程序代码签名后,Google Play会在上传apk时出现错误

Upload failed

You uploaded an APK signed with a certificate that is not yet valid. 
You need to sign your APK with a certificate that is currently valid. 

Learn more about signing.

所以我通过执行以下命令使用keytool创建了一个新证书:

$ keytool -keystore cert.jks -genkeypair -alias cert -keyalg RSA -keysize 2048 \
  -validity 18250 -dname 'CN=cert,OU=org,O=org,L=location,ST=state,C=PH'

$ keytool -keystore cert.jks -exportcert -alias cert \
  | openssl x509 -inform der -text

$ keytool -importkeystore -srckeystore cert.jks -destkeystore cert.p12 \
  -srcstoretype jks -deststoretype pkcs12