code: private SSLSocketFactory initSslSocketFactory(KeyManager[] kms, TrustManager[] tms)
  			throws InitializationException {
  
  		SSLContext ctx = null;
  
  		String verify = System.getProperty(VERIFY_PEER_CERT_PROPERTY);
  
  
  		// If VERIFY_PEER_PROPERTY is set to false, we don't want verification
  		// of the other sides certificate
  		if (verify != null &&  verify.equals("false")) {
  			tms = getTrustAllKeystore();
  		} else if (verify == null || verify != null && verify.equals("true")) {
  			// use the given tms
  		} else {
  			throw new InitializationException("Bad value for "
  					+ VERIFY_PEER_CERT_PROPERTY +  " property. Expected: true|false");
  		}
  
  		if (!isBasicAuth() && kms == null) {
  			throw new InitializationException("certificate-based auth needs a KeyManager");
  		}
  
  
  		try {
  			ctx = SSLContext.getInstance("TLS");
  			ctx.init(kms, tms, new SecureRandom());
  		} catch (Exception e) {
  			/* catch all */
  			IfmapJLog.error("Could not initialize SSLSocketFactory ["
  								  + e.getMessage() + "]");
  			throw new InitializationException(e);
  		}
  		return ctx.getSocketFactory();
  	}
docs: get a {@link SSLSocketFactory} based on the {@link KeyManager} and
  {@link TrustManager} objects we got.
  
  @throws InitializationException