Link to home
Start Free TrialLog in
Avatar of dr0zaxx
dr0zaxx

asked on

Unable to initiate SSL GET or POST with cert

Hello,

With a HTTP packet sniffer, I am able to view the GET and POST made by my application to a normal HTTP website. By when doing it for a HTTPS site that requires a certificate to be present, it doesn't work. Both GET and POST doesnt show up, but I am still able to view the response body string as a printout. As for POST to the HTTPS, no matter what, the website doesnt accept it. Any help?
Avatar of dr0zaxx
dr0zaxx

ASKER

I used this in my code together with the website certificate

System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home") + "/.keystore");

and if I don't use this, I will get an 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 error
ASKER CERTIFIED SOLUTION
Avatar of Mayank S
Mayank S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial