lv.pasts.eme.security

## Interface KeyStoreManagerCallback

-     public interface KeyStoreManagerCallback

  `KeyStoreManagerCallback` class is a callback used to interact with the user while accessing the keystore.

  An application implements a `KeyStoreManagerCallback` and passes it to the `KeyStoreManager` so that it may interact with the application to retrieve specific data, such as key password, or to display certain information. For example, implementations for an application with a graphical user interface (GUI) may pop up windows to prompt for requested information or to display error messages. An implementation may also choose to obtain requested information from an alternate source without asking the end user.

  Since:
    1.3.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `char[]` | `getKeyPassword(String alias, boolean isRetry)` Requests user the password required to recover the key associated with the given alias.
    `CertificateEntry` | `selectClientAuthenticationCertificate(CertificateEntry[] entries)` Requests user to select the client authentication certificate from the given certificate list.
    `CertificateEntry` | `selectDocumentSigningCertificate(CertificateEntry[] entries)` Requests user to select the signing certificate from the given certificate list.

- - ### Method Detail

    - #### getKeyPassword

          char[] getKeyPassword(String alias,
                                boolean isRetry)

      Requests user the password required to recover the key associated with the given alias.

      The method can be called repeatedly until a correct password is provided. The number of retries depends on the currently managed keystore and hence it can be unlimited.

      Parameters:
        `alias` - the `alias` name of the associated key.
        `isRetry` - true if the previously provided password was incorrect.
      Returns:
        the retrieved password code or `null` if action is cancelled.

    - #### selectDocumentSigningCertificate

          CertificateEntry selectDocumentSigningCertificate(CertificateEntry[] entries)

      Requests user to select the signing certificate from the given certificate list.
      Parameters:
        `entries` - an array of certificate entries containing available signing certificates.
      Returns:
        the selected certificate entry or `null` if action is cancelled.
        Use `CertificateEntry.REFRESH_MARKER` to refresh the certificate list and invoke this method again.
      See Also:
        `KeyAccessor.getDocumentSigningCertificateEntries()`

    - #### selectClientAuthenticationCertificate

          CertificateEntry selectClientAuthenticationCertificate(CertificateEntry[] entries)

      Requests user to select the client authentication certificate from the given certificate list.
      Parameters:
        `entries` - an array of certificate entries containing available client authentication certificates.
      Returns:
        the selected certificate entry or `null` if action is cancelled.
        Use `CertificateEntry.REFRESH_MARKER` to refresh the certificate list and invoke this method again.
      See Also:
        `KeyAccessor.getClientAuthenticationCertificateEntries()`

Copyright VAS Latvijas Valsts radio un televizijas centrs / Developed by SIA EUSO