Class KeyStoreKeyManagerProperties

java.lang.Object
com.unboundid.util.ssl.KeyStoreKeyManagerProperties
All Implemented Interfaces:
Serializable

This class provides a data structure with information about properties to use when accessing the KeyStoreKeyManager.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new set of key manage provider properties for the specified key store file.
    Creates a new set of key manage provider properties for the specified key store file.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.
    Retrieves the alias (nickname) of the certificate chain to use in the target key store, if specified.
    Retrieves the format for the target key store, if specified.
    Retrieves the path to the target key store file.
    char[]
    Retrieves the PIN needed to access the contents of the key store, if specified.
    Retrieves the security provider to use to access the key store, if a non-default provider should be used.
    void
    setAllowNonFIPSInFIPSMode(boolean allowNonFIPSInFIPSMode)
    Specifies whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.
    void
    setCertificateAlias(String certificateAlias)
    Specifies the alias (nickname) of the certificate chain ot use in the target key store.
    void
    setKeyStoreFile(File keyStoreFile)
    Specifies the target key store file.
    void
    setKeyStoreFormat(String keyStoreFormat)
    Specifies the format for the target key store.
    void
    setKeyStorePath(String keyStorePath)
    Specifies the path to the target key store file.
    void
    setKeyStorePIN(char[] keyStorePIN)
    Specifies the PIN needed to access the contents of the key store.
    void
    setKeyStorePIN(String keyStorePIN)
    Specifies the PIN needed to access the contents of the key store.
    void
    Specifies the security provider to use to access the key store.
    void
    setValidateKeyStore(boolean validateKeyStore)
    Specifies whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.
    Retrieves a string representation of these properties.
    void
    Appends a string representation of these properties to the provided buffer.
    boolean
    Indicates whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.

    Methods inherited from class java.lang.Object

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

    • KeyStoreKeyManagerProperties

      Creates a new set of key manage provider properties for the specified key store file.
      Parameters:
      keyStoreFile - The target key store file. It must not be null.
    • KeyStoreKeyManagerProperties

      Creates a new set of key manage provider properties for the specified key store file.
      Parameters:
      keyStorePath - The path to the target key store file. It must not be null.
  • Method Details

    • getKeyStorePath

      Retrieves the path to the target key store file.
      Returns:
      The path to the target key store file.
    • setKeyStoreFile

      public void setKeyStoreFile(@NotNull File keyStoreFile)
      Specifies the target key store file.
      Parameters:
      keyStoreFile - The target key store file. It must not be null.
    • setKeyStorePath

      public void setKeyStorePath(@NotNull String keyStorePath)
      Specifies the path to the target key store file.
      Parameters:
      keyStorePath - The path to the target key store file. It must not be null.
    • getKeyStorePIN

      @Nullable public char[] getKeyStorePIN()
      Retrieves the PIN needed to access the contents of the key store, if specified.
      Returns:
      The PIN needed to access the contents of the key store, or null if none has been specified.
    • setKeyStorePIN

      public void setKeyStorePIN(@Nullable char[] keyStorePIN)
      Specifies the PIN needed to access the contents of the key store.
      Parameters:
      keyStorePIN - The PIN needed to access the contents of the key store. It may be null if no PIN is needed.
    • setKeyStorePIN

      public void setKeyStorePIN(@Nullable String keyStorePIN)
      Specifies the PIN needed to access the contents of the key store.
      Parameters:
      keyStorePIN - The PIN needed to access the contents of the key store. It may be null if no PIN is needed.
    • getKeyStoreFormat

      Retrieves the format for the target key store, if specified.
      Returns:
      The format for the target key store, or null if a default format should be used.
    • setKeyStoreFormat

      public void setKeyStoreFormat(@Nullable String keyStoreFormat)
      Specifies the format for the target key store.
      Parameters:
      keyStoreFormat - The format for the target key store. It may be null if a default format should be used.
    • getCertificateAlias

      Retrieves the alias (nickname) of the certificate chain to use in the target key store, if specified.
      Returns:
      The alias of the certificate chain to use in the target key store, or null if any acceptable certificate found in the key store may be used.
    • setCertificateAlias

      public void setCertificateAlias(@Nullable String certificateAlias)
      Specifies the alias (nickname) of the certificate chain ot use in the target key store.
      Parameters:
      certificateAlias - The alias of the certificate chain to use in the target key store. It may be null if any acceptable certificate found in the key store may be used.
    • validateKeyStore

      public boolean validateKeyStore()
      Indicates whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.
      Returns:
      true if the key store should be validated before attempting to use it, or false if not.
    • setValidateKeyStore

      public void setValidateKeyStore(boolean validateKeyStore)
      Specifies whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.
      Parameters:
      validateKeyStore - Indicates whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain. If a certificate alias was specified, then this will ensure that the key store contains a valid private key entry with that alias. If no certificate alias was specified, then this will ensure that the key store contains at least one valid private key entry.
    • getProvider

      Retrieves the security provider to use to access the key store, if a non-default provider should be used.
      Returns:
      The security provider to use to access the key store, or null if a default provider should be used.
    • setProvider

      public void setProvider(@Nullable Provider provider)
      Specifies the security provider to use to access the key store.
      Parameters:
      provider - The security provider to use to access the key store. It may be null if a default provider should be used.
    • allowNonFIPSInFIPSMode

      public boolean allowNonFIPSInFIPSMode()
      Indicates whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.
      Returns:
      true if access to a non-FIPS-compliant key store should be allowed even when operating in FIPS-compliant mode, or false if not.
    • setAllowNonFIPSInFIPSMode

      public void setAllowNonFIPSInFIPSMode(boolean allowNonFIPSInFIPSMode)
      Specifies whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.
      Parameters:
      allowNonFIPSInFIPSMode - Indicates whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.
    • toString

      Retrieves a string representation of these properties.
      Overrides:
      toString in class Object
      Returns:
      A string representation of these properties.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of these properties to the provided buffer.
      Parameters:
      buffer - The buffer to which the information should be appended. It must not be null.