For development purposes only, I'm trying to force java to accept the SSL certificate from our server. In c# I am able to do this:
public class MyPolicy : ICertificatePolicy
{
public bool CheckValidationResult(
ServicePoint srvPoint
, X509Certificate certificate
, WebRequest request
, int certificateProblem)
{
//Return True to force the certificate to be accepted.
return true;
} // end CheckValidationResult
} // class MyPolicy
And instantiate it prior to connecting to the server as such:
System.Net.ServicePointManager.CertificatePolicy = new MyPolicy();
Is there a similar solution in Java?