* @param useInsecureSSL whether or not to use insecure SSL
* @throws GeneralSecurityException if a security error occurs
*/
public void setUseInsecureSSL(final boolean useInsecureSSL) throws GeneralSecurityException {
if (useInsecureSSL) {
final ProtocolSocketFactory factory = new InsecureSSLProtocolSocketFactory();
final Protocol https = new Protocol("https", factory, 443);
Protocol.registerProtocol("https", https);
}
else {
Protocol.unregisterProtocol("https");