java.lang.Object
de.hybris.platform.samlsinglesignon.utils.JKSUtil

public final class JKSUtil extends Object
Util class for managing java keystore containing saml related entries
  • Field Details

  • Method Details

    • getSigningAndDecryptionSaml2Credentials

      public static org.springframework.security.saml2.core.Saml2X509Credential getSigningAndDecryptionSaml2Credentials(org.springframework.core.io.Resource keyStoreFile, String keyStorePassword, Map<String,String> privateKeyPasswords, String privateKeyEntryAlias)
      Returns Saml2X509Credential of the type SIGNING and DECRYPTION created based on key entry with provided alias, found in the key store
      Parameters:
      keyStoreFile - location of the key store file
      keyStorePassword - password of the key store
      privateKeyPasswords - map of passwords available in the key store, consisting of aliases of the passwords (keys) and passwords (values)
      privateKeyEntryAlias - alias of key entry on the basis of which Saml2X509Credential are created
      Returns:
      Saml2X509Credential of the type SIGNING and DECRYPTION
    • getAllCertificates

      public static Collection<X509Certificate> getAllCertificates(org.springframework.core.io.Resource keyStoreFile, String keyStorePassword)
      Returns collection of all X509Certificates available in the provided key store
      Parameters:
      keyStoreFile - location of the key store file
      keyStorePassword - password of the key store
      Returns:
      collection of X509Certificates
    • getPrivateKeyPasswordForProvidedAlias

      protected static KeyStore.PasswordProtection getPrivateKeyPasswordForProvidedAlias(Map<String,String> privatePasswords, String privateKeyEntryAlias)