Code example for SecureRandom

0
            HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier(){
                    public boolean verify(String hostname, SSLSession session) {
                        return true; 
                    }}); 
            SSLContext context = SSLContext.getInstance("TLS");
            context.init(null, new X509TrustManager[]{new IntelligentX509TrustManager(c)}, new SecureRandom());
            HttpsURLConnection.setDefaultSSLSocketFactory(
                                                          context.getSocketFactory());
        } catch (Exception e) { // should never happen
            e.printStackTrace();
        } 
    } 
 
	private HttpURLConnection createConnection(String url) {
        URL newUrl = null;
		try { 
            newUrl = new URL(url);
		} catch (MalformedURLException e) {
			return null; 
		}