Code example for NoSuchAlgorithmException

0
		factory.init((KeyStore) null);
		TrustManager[] trustmanagers = factory.getTrustManagers();
 
		if (trustmanagers.length == 0)
		{ 
			throw new NoSuchAlgorithmException("No trust manager");
		} 
 
		trustManager = (X509TrustManager) trustmanagers[0];
	} 
 
	/* 
	 * (non-Javadoc) 
	 * 
	 * @see 
	 * javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert. 
	 * X509Certificate[], java.lang.String) 
	 */ 
	public void checkClientTrusted(X509Certificate[] certificates, String authType) throws CertificateException
	{ 
		trustManager.checkClientTrusted(certificates, authType);