Class JKSUtil
java.lang.Object
de.hybris.platform.samlsinglesignon.utils.JKSUtil
Util class for managing java keystore containing saml related entries
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<X509Certificate>getAllCertificates(org.springframework.core.io.Resource keyStoreFile, String keyStorePassword) Returns collection of allX509Certificatesavailable in the provided key storeprotected static KeyStore.PasswordProtectiongetPrivateKeyPasswordForProvidedAlias(Map<String, String> privatePasswords, String privateKeyEntryAlias) static org.springframework.security.saml2.core.Saml2X509CredentialgetSigningAndDecryptionSaml2Credentials(org.springframework.core.io.Resource keyStoreFile, String keyStorePassword, Map<String, String> privateKeyPasswords, String privateKeyEntryAlias) ReturnsSaml2X509Credentialof thetypeSIGNING and DECRYPTION created based on key entry with provided alias, found in the key store
-
Field Details
-
JAVA_KEY_STORE_TYPE
- See Also:
-
PRIVATE_KEY_PASSWORD
- See Also:
-
KEY_ENTRY
- See Also:
-
CERTIFICATE
- See Also:
-
-
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) ReturnsSaml2X509Credentialof thetypeSIGNING and DECRYPTION created based on key entry with provided alias, found in the key store- Parameters:
keyStoreFile- location of the key store filekeyStorePassword- password of the key storeprivateKeyPasswords- 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 whichSaml2X509Credentialare created- Returns:
Saml2X509Credentialof thetypeSIGNING and DECRYPTION
-
getAllCertificates
public static Collection<X509Certificate> getAllCertificates(org.springframework.core.io.Resource keyStoreFile, String keyStorePassword) Returns collection of allX509Certificatesavailable in the provided key store- Parameters:
keyStoreFile- location of the key store filekeyStorePassword- password of the key store- Returns:
- collection of
X509Certificates
-
getPrivateKeyPasswordForProvidedAlias
protected static KeyStore.PasswordProtection getPrivateKeyPasswordForProvidedAlias(Map<String, String> privatePasswords, String privateKeyEntryAlias)
-