How to fix java.security.cert.CertPathValidatorException: timestamp check failed - java

My mac has a TFS build agent connecting to a TFS server. That works fine. But when fetching the source code it fails with the following error:
An error occurred: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
When I on the mac, remove the old certificate for the TFS server from the Java Truststore I get the following error:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
If I add a new certificate for the server, into the Java truststore (the cacerts file) with good new valid time stamps, I get this error:
PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
Thus, I know that I am making changes to the correct cacerts file, since I'am getting different output based on the two scenarios above.
I've been scanning through the cacert file, trying to find if any expired cert for the TFS server is still there. Can't find any.
I've tried importing both the root cert and the site cert, but no difference there.
No problems connecting to the server site with Safari or using curl. The certificate on the server is renewed and has valid timestamps.
Any help would be greatly appreciated.

I managed to get by the issue by installing a brand new, latest version build agent.

Related

PKIX building failed:sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I am running an application in Eclipse locally. It tries to connect to an external URL to fetch some data. This application works fine from browser, but when I try the same from Eclipse as localhost, I get the below error:
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:456)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:323)
at sun.security.validator.Validator.validate(Validator.java:271)
Many solutions, have mentioned to add the URL certificate from the browser using keytool. This application shows "This site does not have a certificate.". The application URL does not have a certificate.
In this case, how can I fix this issue without a certificate to install?
Regards,
R
looks like you are running any java based application on a web server(e.g. Tomcat) with HTTPS enabled.
If you donot have signed any self certificate, then following link can help:
How to configure Tomcat to support SSL or https
Further this link has discussed the matter in detail:
Stackoverflow Link

AEM 6.5 PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException

I have been struggling with getting AEM instances to work with the certs/keys generated by a trusted source. I am following the /libs/granite/security/content/sslConfig.html wizard and AEM tells me everything is configured properly. I then try going to access my instance over https in my browser (incognito window) on my new port and my certificate is recognized by my browser. Finally I go to my replication agent on Author and update the configuration to use the same exact https URL/Port I just tested in my browser that worked minutes before and a simple test of that newly updated agent spits out the following error message:
Replication test failed
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I have double checked the ssl-service and can see my cert/key is correctly installed there.
If anyone has an idea why the replication agent is acting this way and how to fix it I'm open to suggestions.
Thanks
Is it a local cert? Look at the Transport tab, then choose Relaxed. Let me know if that helps.

Google Analytics API java lib - certificate error

I am using this java library to extract GA data. But it is generating the following certificate error:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
I verified that it is trying to establish connection with url https://lhr26s05-in-f13.1e100.net which outputs a certificate error when accessed through the browser. I'm surprised this is happening as this is a google owned domain.
I have tried to manually download the certificate and add it to the cacerts file but that didn't work.
I have also tried to trust the certificate like this which has worked on other projects, but not for this one. I wonder if this is not working because I am using the google api java libraries? I'm out of ideas and would appreciate any suggestions

javax.net.ssl.SSLHandshakeException

Recently we had an issue with one of our java applications that was trying to run an SSL protected web service of amazone load balancer,that had their certificate signed by GoDaddy. we did not Copy and paste the contents of the public key certificate chain file (PEM-encoded) in the Certificate Chain box. now we were seeing the following error:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
. Is there a way to resolve this exception?
This error means your java keystore doesnt have ssl certificate for service you are trying to connect.
You need to add the public certificate of GoDaddy/Intermediate CA to your java keystore.
you can use keytool command for that

Installing ValiCert Class 3 PKI (X.509) certificate in jre's keystore on Red Hat Linux

I have a web application deployed on Linux machine. Now, while generating pdf in web application I am getting following error:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
It seems that ValiCert Class 3 PKI (X.509) certificate is missing in jre's keystore. Does anyone have an idea of how to download it on Linux? Please provide the steps or link where I can get the required information?
Thnaks in advance!

Categories

Resources