Code example for TrustManagerFactory

Methods: getTrustManagers

0
		SSLContext aSC = null;
		if (m_aSSLContext == null)
		{ 
			aSC = SSLContext.getInstance("TLSv1");
			try { 
				aSC.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
			} catch (KeyManagementException e) {
				Log.e(TAG, "Unknown failure from KeyManager!" +
						" Sorry I can't tell you what is actually wrong."); 
				throw new GTBSSLSocketException( 
						"Unknown failure from KeyManager!" + 
						" Sorry I can't tell you what is actually wrong."); 
			} 
			SSLContext.setDefault(aSC);
			m_aSSLContext = aSC;
		} 
	} 
	 
	/** 
	 * Establish TCP connection over TLS with gtbserver. 
Contextual code suggestions in your IDE  Get Codota for Java