Class AS4CryptoProperties

java.lang.Object
com.helger.phase4.crypto.AS4CryptoProperties
All Implemented Interfaces:
com.helger.commons.lang.ICloneable<AS4CryptoProperties>, Serializable

@Immutable @Deprecated(forRemoval=true, since="3.0.0") public class AS4CryptoProperties extends Object implements Serializable, com.helger.commons.lang.ICloneable<AS4CryptoProperties>
Deprecated, for removal: This API element is subject to removal in a future version.
Use AS4CryptoFactoryConfiguration instead. This class will be removed in the next major release.
Wrapper around the crypto properties file.
Deprecated since v3. Please use AS4KeyStoreDescriptor and AS4TrustStoreDescriptor in combination with AS4CryptoFactoryInMemoryKeyStore instead.
Author:
bayerlma, Philip Helger
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    The class name implementing the CryptoProvider - default value is "org.apache.wss4j.common.crypto.Merlin"
    static final com.helger.security.keystore.EKeyStoreType
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final com.helger.security.keystore.EKeyStoreType
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Keystore key alias
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Keystore key password
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Keystore filename/path
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Keystore password
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Keystore type: JKS or PKCS12
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Type boolean
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Truststore filename/path
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Truststore password
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Truststore provider - must usually not be set
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Truststore type - JKS or PKCS12?
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Default constructor having only the crypto provider property set to default.
    AS4CryptoProperties(com.helger.commons.io.resource.IReadableResource aRes)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor reading the properties from a resource using the Properties file syntax
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    char[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    com.helger.security.keystore.EKeyStoreType
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    com.helger.commons.state.ETriState
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    com.helger.security.keystore.EKeyStoreType
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setCryptoProvider(String sCryptoProvider)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setKeyAlias(String sKeyAlias)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setKeyPassword(String sKeyPassword)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setKeyStorePassword(String sKeyStorePassword)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setKeyStorePath(String sKeyStorePath)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setKeyStoreType(com.helger.security.keystore.EKeyStoreType eType)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setLoadCACerts(boolean bLoadCACerts)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setTrustStorePassword(String sTrustStorePassword)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setTrustStorePath(String sTrustStorePath)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setTrustStoreProvider(String sTrustStoreProvider)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setTrustStoreType(com.helger.security.keystore.EKeyStoreType eType)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • CRYPTO_PROVIDER

      public static final String CRYPTO_PROVIDER
      Deprecated, for removal: This API element is subject to removal in a future version.
      The class name implementing the CryptoProvider - default value is "org.apache.wss4j.common.crypto.Merlin"
      See Also:
    • KEYSTORE_TYPE

      public static final String KEYSTORE_TYPE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Keystore type: JKS or PKCS12
      See Also:
    • KEYSTORE_FILE

      public static final String KEYSTORE_FILE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Keystore filename/path
      See Also:
    • KEYSTORE_PASSWORD

      public static final String KEYSTORE_PASSWORD
      Deprecated, for removal: This API element is subject to removal in a future version.
      Keystore password
      See Also:
    • KEY_ALIAS

      public static final String KEY_ALIAS
      Deprecated, for removal: This API element is subject to removal in a future version.
      Keystore key alias
      See Also:
    • KEY_PASSWORD

      public static final String KEY_PASSWORD
      Deprecated, for removal: This API element is subject to removal in a future version.
      Keystore key password
      See Also:
    • LOAD_CACERTS

      public static final String LOAD_CACERTS
      Deprecated, for removal: This API element is subject to removal in a future version.
      Type boolean
      See Also:
    • TRUSTSTORE_PROVIDER

      public static final String TRUSTSTORE_PROVIDER
      Deprecated, for removal: This API element is subject to removal in a future version.
      Truststore provider - must usually not be set
      See Also:
    • TRUSTSTORE_TYPE

      public static final String TRUSTSTORE_TYPE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Truststore type - JKS or PKCS12?
      See Also:
    • TRUSTSTORE_FILE

      public static final String TRUSTSTORE_FILE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Truststore filename/path
      See Also:
    • TRUSTSTORE_PASSWORD

      public static final String TRUSTSTORE_PASSWORD
      Deprecated, for removal: This API element is subject to removal in a future version.
      Truststore password
      See Also:
    • DEFAULT_KEYSTORE_TYPE

      public static final com.helger.security.keystore.EKeyStoreType DEFAULT_KEYSTORE_TYPE
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEFAULT_TRUSTSTORE_TYPE

      public static final com.helger.security.keystore.EKeyStoreType DEFAULT_TRUSTSTORE_TYPE
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • AS4CryptoProperties

      public AS4CryptoProperties()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default constructor having only the crypto provider property set to default.
    • AS4CryptoProperties

      public AS4CryptoProperties(@Nonnull com.helger.commons.io.resource.IReadableResource aRes)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor reading the properties from a resource using the Properties file syntax
      Parameters:
      aRes - The resource to read. May not be null.
  • Method Details

    • isRead

      public final boolean isRead()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      true if properties are available. This is always true when a map was used to initialize it. Only if a resource was used, this may become false.
    • getAsProperties

      @Nullable public Properties getAsProperties()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      A representation of the contained properties as Properties. May be null.
    • getCryptoProvider

      @Nullable public String getCryptoProvider()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setCryptoProvider

      @Nonnull public final AS4CryptoProperties setCryptoProvider(@Nullable String sCryptoProvider)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setCryptoProviderDefault

      @Nonnull public final AS4CryptoProperties setCryptoProviderDefault()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getKeyStoreType

      @Nonnull public com.helger.security.keystore.EKeyStoreType getKeyStoreType()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setKeyStoreType

      @Nonnull public final AS4CryptoProperties setKeyStoreType(@Nullable com.helger.security.keystore.EKeyStoreType eType)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getKeyStorePath

      @Nullable public String getKeyStorePath()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setKeyStorePath

      @Nonnull public final AS4CryptoProperties setKeyStorePath(@Nullable String sKeyStorePath)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getKeyStorePassword

      @Nullable public String getKeyStorePassword()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setKeyStorePassword

      @Nonnull public final AS4CryptoProperties setKeyStorePassword(@Nullable String sKeyStorePassword)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getKeyAlias

      @Nullable public String getKeyAlias()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setKeyAlias

      @Nonnull public final AS4CryptoProperties setKeyAlias(@Nullable String sKeyAlias)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getKeyPassword

      @Nullable public String getKeyPassword()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getKeyPasswordCharArray

      @Nullable public char[] getKeyPasswordCharArray()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setKeyPassword

      @Nonnull public final AS4CryptoProperties setKeyPassword(@Nullable String sKeyPassword)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getLoadCACerts

      @Nonnull public com.helger.commons.state.ETriState getLoadCACerts()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setLoadCACerts

      @Nonnull public final AS4CryptoProperties setLoadCACerts(boolean bLoadCACerts)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTrustStoreProvider

      @Nullable public String getTrustStoreProvider()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTrustStoreProvider

      @Nonnull public final AS4CryptoProperties setTrustStoreProvider(@Nullable String sTrustStoreProvider)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTrustStoreType

      @Nonnull public com.helger.security.keystore.EKeyStoreType getTrustStoreType()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTrustStoreType

      @Nonnull public final AS4CryptoProperties setTrustStoreType(@Nullable com.helger.security.keystore.EKeyStoreType eType)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTrustStorePath

      @Nullable public String getTrustStorePath()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTrustStorePath

      @Nonnull public final AS4CryptoProperties setTrustStorePath(@Nullable String sTrustStorePath)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTrustStorePassword

      @Nullable public String getTrustStorePassword()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTrustStorePassword

      @Nonnull public final AS4CryptoProperties setTrustStorePassword(@Nullable String sTrustStorePassword)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getClone

      @Nonnull @ReturnsMutableCopy public AS4CryptoProperties getClone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getClone in interface com.helger.commons.lang.ICloneable<AS4CryptoProperties>
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • createFromConfig

      @Nonnull public static AS4CryptoProperties createFromConfig()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      A new AS4CryptoProperties object filled with all values from the global configuration file. Values not present in the configuration are not set and stay with their default values.
      Since:
      0.11.0