private static boolean isInKeyStore(X509Certificate signedCert, KeyStore keyStore)
throws Exception {
if (signedCert == null || keyStore == null) {
throw new RelyingPartyException("invalidInputParams");
}
// validity period
signedCert.checkValidity();
try {
if (keyStore.getCertificateAlias(signedCert) != null) {
return true;
} else {
return false;
}
} catch (KeyStoreException e) {
log.error("The keystore has not been initialized", e);
throw new RelyingPartyException("errorLoadingTrustedKeystore", e);
}
}