Code example for SSLSession

Methods: getPeerHost

0
					HostnameVerifier hv = new HostnameVerifier() {
						public boolean verify(String urlHostName,
								SSLSession session) {
							System.out.println("Warning: URL Host: "
									+ urlHostName + " vs. "
									+ session.getPeerHost());
							return true; 
						} 
					}; 
					trustAllHttpsCertificates(); 
					HttpsURLConnection.setDefaultHostnameVerifier(hv);
				} catch (Exception e) {
					// nothing 
				} 
 
				// Open HTTPS connection 
				conn = (HttpsURLConnection) url.openConnection();
				// conn.setSSLSocketFactory(context.getSocketFactory());///////////////// 
				// conn.setSSLSocketFactory(newSslSocketFactory(this));///////////////// 
 
				// Allow Inputs