SSL Error
Posted: Mon Feb 29, 2016 2:39 pm
We are currently developing a Cloud Application making use of the xServer Internet Service. We use the Java API to do the service calls. On the local Tomcat development environment everything works fine and the results look good.
However, if we deploy the application to the Cloud System (a SAP HANA Cloud Platform with Tomcat runtime) we get the following exception on calling the PTV service:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
So there is a problem with the certificate chain and from the exception it seems like PTV is using the Sun libaries for building the SSL context. For the javax.net.ssl libary there are methods like:
javax.net.ssl.SSLContext.setDefault(myContext); //trust all context
javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(hv);
javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(myContext.getSocketFactory());
My question is now, how can I add a trustsore/trusmanager to the PTV client using the Java API?
Regards
Frank Essenberger
However, if we deploy the application to the Cloud System (a SAP HANA Cloud Platform with Tomcat runtime) we get the following exception on calling the PTV service:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
So there is a problem with the certificate chain and from the exception it seems like PTV is using the Sun libaries for building the SSL context. For the javax.net.ssl libary there are methods like:
javax.net.ssl.SSLContext.setDefault(myContext); //trust all context
javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(hv);
javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(myContext.getSocketFactory());
My question is now, how can I add a trustsore/trusmanager to the PTV client using the Java API?
Regards
Frank Essenberger