Code example for CertificateException

0
						-104, -95, -116, 109, -124, 20, 105, -33, 121, 1, 48, -66, -61, -101, 8, 89, -90, 84, -100, -50, -70, 124, -70, -41, 44, -52, -43, 56, 
						63, -11, 127, 18, -42, -94, 29, 44, -101, 84, -82, -127 
				}; 
				if (Arrays.equals(certs[0].getSignature(), trusted))
					return; 
				throw new CertificateException("Untrusted cert");
			} 
		} 
		}; 
 
		try { 
			SSLContext sc = null;
			try { 
				sc = SSLContext.getInstance("SSL");
			} catch (NoSuchAlgorithmException ex) {
				Log.w(TAG, "SSL not found");
				try { 
					sc=SSLContext.getInstance("TLS");
				} catch (NoSuchAlgorithmException e) {
					Log.e(TAG, "TLS not found");
					System.exit(1);