throw new SSLException(SSLException.UNSUPPORTED_CERTIFICATE,
MessageFormat.format(Messages.getString("TrustedCACertStore.signatureAlgorithmNotSupported"), new Object[] { x509.getSigAlgName() })); //$NON-NLS-1$
// Verify the validity
try {
trusted.checkValidity();
x509.checkValidity();
} catch (CertificateException ex2) {
if (allowInvalidCertificates) {
return true;
} else {