@Immutable public class AS4CryptoFactoryPropertiesFile extends Object implements IAS4CryptoFactory
AS4CryptoProperties for
the list of supported property names.| Constructor and Description |
|---|
AS4CryptoFactoryPropertiesFile(AS4CryptoProperties aCryptoProps)
This constructor takes the crypto properties directly.
|
AS4CryptoFactoryPropertiesFile(String sCryptoPropertiesPath)
Should be used if you want to use a non-default crypto properties to create
your Crypto-Instance.
|
| Modifier and Type | Method and Description |
|---|---|
static org.apache.wss4j.common.crypto.Crypto |
createCrypto(AS4CryptoProperties aCryptoProps) |
AS4CryptoProperties |
cryptoProperties() |
X509Certificate |
getCertificate() |
org.apache.wss4j.common.crypto.Crypto |
getCrypto()
Lazily create a
Crypto instance using the properties from
cryptoProperties(). |
static AS4CryptoFactoryPropertiesFile |
getDefaultInstance() |
String |
getKeyAlias() |
String |
getKeyPassword() |
KeyStore |
getKeyStore() |
KeyStore.PrivateKeyEntry |
getPrivateKeyEntry() |
static AS4CryptoProperties |
readCryptoPropertiesFromFile(String sCryptoPropertiesPath)
Read crypto properties from the specified file path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateWSSConfigpublic AS4CryptoFactoryPropertiesFile(@Nullable String sCryptoPropertiesPath)
sCryptoPropertiesPath - when this parameter is null, the default values will
get used. Else it will try to invoke the given properties and read
them throws an exception if it does not work.com.helger.commons.exception.InitializationException - If the file could not be loadedpublic AS4CryptoFactoryPropertiesFile(@Nonnull AS4CryptoProperties aCryptoProps)
AbstractAS4Client for a usage example.aCryptoProps - The properties to be used. May not be null. Note: the
object is cloned internally to avoid outside modification.@Nullable public static AS4CryptoFactoryPropertiesFile getDefaultInstance()
null.@Nonnull public static AS4CryptoProperties readCryptoPropertiesFromFile(@Nullable String sCryptoPropertiesPath)
sCryptoPropertiesPath - The class path to read the properties file from. It is
null or empty, than the default file
"crypto.properties" is read.null.@Nonnull @ReturnsMutableObject public final AS4CryptoProperties cryptoProperties()
null.@Nonnull public static org.apache.wss4j.common.crypto.Crypto createCrypto(@Nonnull AS4CryptoProperties aCryptoProps)
@Nonnull public final org.apache.wss4j.common.crypto.Crypto getCrypto()
Crypto instance using the properties from
cryptoProperties().getCrypto in interface IAS4CryptoFactoryCrypto instance and never null.@Nullable public final KeyStore getKeyStore()
getKeyStore in interface IAS4CryptoFactorynull if none is available
(the reasons depend on the used implementation).@Nullable public final KeyStore.PrivateKeyEntry getPrivateKeyEntry()
getPrivateKeyEntry in interface IAS4CryptoFactorynull if none is available (the reasons depend on the
used implementation).@Nullable public final String getKeyAlias()
getKeyAlias in interface IAS4CryptoFactorynull.@Nullable public final String getKeyPassword()
getKeyPassword in interface IAS4CryptoFactorynull.@Nullable public final X509Certificate getCertificate()
null if the private key entry could not be loaded.getPrivateKeyEntry()Copyright © 2015–2020 Philip Helger. All rights reserved.