glassfish 证书过期错误SEVERE: SEC5054: Certificate has expired:



from: http://www.adam-bien.com/roller/abien/entry/how_to_fix_expired_certificate


The following error:


com.sun.enterprise.security.ssl.impl.SecuritySupportImpl checkCertificateDates
SEVERE: SEC5054: Certificate has expired: [
[
  Version: V3
  Subject: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
  Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

  Key:  Sun RSA public key, 2048 bits


Is caused by certificate expiration in the keystore file: cacerts.jks. The cacerts.jks file usually resides in the folder: [GLASSFISH_HOME]/glassfish4/glassfish/domains/[DOMAIN_NAME]/config. With embedded GlassFish the certificate is extracted into the folder [USER]/.glassfishv3-arquillian[...]/config.

Copy the keystore file cacerts.jks into src/test/resources/config and mvm clean install you project.




To find if the ca is included in cacerts.jks, just use the following command,

then find get the alias: gtecybertrust5ca.


C:\Java\glassfish4\glassfish\domains\domain1\config>keytool -list -v -keystore cacerts.jks
 -storepass changeit|find "CN=GTE CyberTrust Root 5"






In case the keystore file also contains the expired certificate, simply delete the affected certificate:

keytool -delete -keystore ./cacerts.jks -alias gtecybertrust5ca
Password: changeit






猜你喜欢

转载自iintothewind.iteye.com/blog/2076709