Code example for KeyStore

Methods: containsAliasgetCertificate

0
			throws RelyingPartyException { 
		X509Credential credential = null;
		java.security.cert.X509Certificate cert = null;
 
		try { 
			if (trustStore.containsAlias(alias)) {
				cert = (java.security.cert.X509Certificate) trustStore.getCertificate(alias);
				credential = new X509CredentialImpl(cert);
			} 
		} catch (KeyStoreException e) {
			log.error("Error while loading credentials from trust store", e);
			throw new RelyingPartyException("Error while loading credentials from trust store", e);
		} 
		return credential;
	} 
 
	/** 
	 * Creates the certificate from the KeyInfo element. 
	 */ 
	public static X509Credential loadCredentialFromSignature(Signature signature)