SingleCertValidatingFactory not working with AWS RDS global-bundle.pem? #2672
-
Hi, I want to use the https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem which is stored in my application jar i.e. using classpath. So I tried using the below jdbc url
However, I am getting an exception PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Instead of Without using SingleCertValidatingFactory, the .pem file works with file system path like below
Does SingleCertValidatingFactory not work with .pem files? What do I need to do to make it work. Any help is appreciated. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I think you need to convert it to a .der file see https://jdbc.postgresql.org/documentation/ssl/ Let me know how this goes. |
Beta Was this translation helpful? Give feedback.
-
@kamatvishal does it work in .pem format or .der format? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the information! |
Beta Was this translation helpful? Give feedback.
@kamatvishal does it work in .pem format or .der format?