Class KeyUtil
- java.lang.Object
-
- com.sun.identity.wsfederation.key.KeyUtil
-
public class KeyUtil extends Object
TheKeyUtilprovides methods to obtain the hosting entity's signing key and decryption key, and to obtain a partner entity's signature verification key and encryption related information
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static X509CertificategetCert(FederationElement fed)Returns certificate stored inFederationElement.static PrivateKeygetDecryptionKey(BaseConfigType baseConfig)Returns the host entity's decryption key.static KeyProvidergetKeyProviderInstance()Returns the instance ofKeyProvider.static StringgetSigningCertAlias(BaseConfigType baseConfig)Returns the host entity's signing certificate alias.static X509CertificategetVerificationCert(FederationElement fed, String entityID, boolean isIDP)Returns the partner entity's signature verification certificate.
-
-
-
Method Detail
-
getKeyProviderInstance
public static KeyProvider getKeyProviderInstance()
Returns the instance ofKeyProvider.- Returns:
KeyProvider
-
getSigningCertAlias
public static String getSigningCertAlias(BaseConfigType baseConfig)
Returns the host entity's signing certificate alias.- Parameters:
baseConfig-BaseConfigTypefor the host entity- Returns:
Stringfor host entity's signing certificate alias
-
getDecryptionKey
public static PrivateKey getDecryptionKey(BaseConfigType baseConfig)
Returns the host entity's decryption key.- Parameters:
baseConfig-BaseConfigTypefor the host entity- Returns:
PrivateKeyfor decrypting a message received by the host entity
-
getVerificationCert
public static X509Certificate getVerificationCert(FederationElement fed, String entityID, boolean isIDP)
Returns the partner entity's signature verification certificate.- Parameters:
fed-FederationElementfor the partner entityentityID- partner entity's IDisIDP- whether partner entity's role is IDP or SP- Returns:
X509Certificatefor verifying the partner entity's signature
-
getCert
public static X509Certificate getCert(FederationElement fed)
Returns certificate stored inFederationElement.- Parameters:
fed-FederationElementwhich contains certificate info- Returns:
- X509Certificate contained in
FederationElement; ornullif no certificate is included.
-
-