Package com.helger.phase4.crypto
Class AS4CryptoFactoryProperties
java.lang.Object
com.helger.phase4.crypto.AbstractAS4CryptoFactory
com.helger.phase4.crypto.AS4CryptoFactoryProperties
- All Implemented Interfaces:
IAS4CryptoFactory
@Immutable
@Deprecated(forRemoval=true,
since="3.0.0")
public class AS4CryptoFactoryProperties
extends AbstractAS4CryptoFactory
Deprecated, for removal: This API element is subject to removal in a future version.
phase4 crypto factory settings based on
AS4CryptoProperties- Since:
- 0.11.0
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionAS4CryptoFactoryProperties(AS4CryptoProperties aCryptoProps) Deprecated, for removal: This API element is subject to removal in a future version.This constructor takes the crypto properties directly. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.wss4j.common.crypto.CryptocreateCrypto(AS4CryptoProperties aCryptoProps) Deprecated, for removal: This API element is subject to removal in a future version.Helper method to create a WSS4JCryptoinstance based on the provided crypto properties.final AS4CryptoPropertiesDeprecated, for removal: This API element is subject to removal in a future version.final org.apache.wss4j.common.crypto.CryptogetCrypto(ECryptoMode eCryptoMode) Deprecated, for removal: This API element is subject to removal in a future version.Lazily create aCryptoinstance using the properties fromcryptoProperties().static AS4CryptoFactoryPropertiesDeprecated, for removal: This API element is subject to removal in a future version.final StringDeprecated, for removal: This API element is subject to removal in a future version.char[]getKeyPasswordPerAliasCharArray(String sSearchKeyAlias) Deprecated, for removal: This API element is subject to removal in a future version.Returns the password for the key represented by the provided alias.final KeyStoreDeprecated, for removal: This API element is subject to removal in a future version.final KeyStoreDeprecated, for removal: This API element is subject to removal in a future version.static AS4CryptoPropertiesreadCryptoPropertiesFromFile(String sCryptoPropertiesPath) Deprecated, for removal: This API element is subject to removal in a future version.Read crypto properties from the specified file path.Methods inherited from class com.helger.phase4.crypto.AbstractAS4CryptoFactory
getCertificate, getPrivateKeyEntryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.phase4.crypto.IAS4CryptoFactory
getKeyPasswordPerAlias
-
Constructor Details
-
AS4CryptoFactoryProperties
Deprecated, for removal: This API element is subject to removal in a future version.This constructor takes the crypto properties directly. See theAbstractAS4Clientfor a usage example.- Parameters:
aCryptoProps- The properties to be used. May not benull. Note: the object is cloned internally to avoid outside modification.
-
-
Method Details
-
getDefaultInstance
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The default instance, created by reading the properties from the configuration sources.
- Since:
- 0.11.0
-
cryptoProperties
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The crypto properties as created in the constructor. Never
null.
-
createCrypto
@Nonnull public static org.apache.wss4j.common.crypto.Crypto createCrypto(@Nonnull AS4CryptoProperties aCryptoProps) Deprecated, for removal: This API element is subject to removal in a future version.Helper method to create a WSS4JCryptoinstance based on the provided crypto properties.- Parameters:
aCryptoProps- The crypto properties to use. May not benull.- Returns:
- A new
Cryptoobject. - Throws:
IllegalStateException- if creation failed
-
getCrypto
@Nonnull public final org.apache.wss4j.common.crypto.Crypto getCrypto(@Nonnull ECryptoMode eCryptoMode) Deprecated, for removal: This API element is subject to removal in a future version.Lazily create aCryptoinstance using the properties fromcryptoProperties().- Parameters:
eCryptoMode- The crypto mode to use. Nevernull.- Returns:
- A WSS4J
Cryptoinstance and nevernull.
-
getKeyStore
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The underlying key store, or
nullif none is available (the reasons depend on the used implementation).
-
getKeyAlias
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The keystore alias to resolve the private key entry. May be
null.
-
getKeyPasswordPerAliasCharArray
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IAS4CryptoFactoryReturns the password for the key represented by the provided alias.- Parameters:
sSearchKeyAlias- The alias of the key whose password is to be retrieved.- Returns:
- The password for the key represented by the provided by the alias
or
nullif the factory doesn't have a password for the key.
-
getTrustStore
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The trust store to be used or
nullif none is configured.
-
readCryptoPropertiesFromFile
@Nonnull public static AS4CryptoProperties readCryptoPropertiesFromFile(@Nullable String sCryptoPropertiesPath) Deprecated, for removal: This API element is subject to removal in a future version.Read crypto properties from the specified file path.- Parameters:
sCryptoPropertiesPath- The class path to read the properties file from. It isnullor empty, than the default file "crypto.properties" is read.- Returns:
- Never
null.
-
AS4CryptoFactoryConfigurationinstead. This class will be removed in the next major release.