Handling SSL Errors

Supplying a handler for Jaxer.XHR.SendOptions.onsslcerterror allows you to inspect a failing SSL certificate. You may then ignore or abort the request by returning true or false, respectively.

Using onsslcerterror in the Jaxer shell

var options = 
{
    extendedResponse: true, 
    onsslcerterror: function(socketInfo, sslStatus, targetSite) { return true; }
}
try
{
    var resp = Jaxer.Web.get("https://example.aptanacloud.com/", options);
    print(uneval(resp.certInfo) + "\n" + resp.text);
}
catch (e)
{
    print(e);
}

// This should print out:

({emailAddress:"(no email address)", 
	subjectName:"CN=example.aptanacloud.com.aptanacloud.com", 
	organization:"", 
	issuerName:"CN=example.aptanacloud.com.aptanacloud.com", 
	issuerOrganization:"example.aptanacloud.com.aptanacloud.com", 
	validity:"1224439493000000/1255975493000000", 
	targetSite:"example.aptanacloud.com:443", 
	isDomainMismatch:true, 
	isNotValidAtThisTime:false, 
	isUntrusted:true, 
	isSelfSigned:true})