public static void validateClient(X509Certificate[] certChain, String authType)
			throws CertificateException {

		CertificateException checkFailure = null;

		TrustManager[] trustManagers = ApplicationTrustManagerFactory.getTrustManagers();
		if (ApplicationTrustManagerFactory.hasCertError()) {
			throw new CertificateException("failed to load CA certs",
				ApplicationTrustManagerFactory.getCertError());
		}

		for (TrustManager trustManager : trustManagers) {
			if (!(trustManager instanceof X509TrustManager)) {
				continue;
			}
			X509TrustManager x509TrustManager = (X509TrustManager) trustManager;

			try {
				x509TrustManager.checkClientTrusted(certChain, authType);
				checkFailure = null;
				break;
			}
			catch (CertificateException e) {
				checkFailure = e;
			}
		}
		if (checkFailure != null) {
			throw checkFailure;// check failed - throw last failure
		}
	}
Validate a client certificate ensuring that it is not expired and is
trusted based upon the active trust managers.
@param certChain X509 certificate chain
@param authType authentication type (i.e., "RSA")
@throws CertificateException if certificate validation fails
Ghidra/Framework/Generic/src/main/java/ghidra/net/ApplicationKeyManagerUtils.java