Interface GpgKeystore


public interface GpgKeystore
Local store of trusted public keys. Note: the keystore can reject a public key being added. In such case, the GpgSignatureValidator has to reject this key.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(List<org.bouncycastle.openpgp.PGPPublicKey> publicKey)
    records the public keys in the store for future use.
    org.bouncycastle.openpgp.PGPPublicKey
    get(String keyID)
    resolve a public key from the store.
  • Method Details

    • get

      org.bouncycastle.openpgp.PGPPublicKey get(String keyID)
      resolve a public key from the store.
      Parameters:
      keyID - - a HEX form of the key ID
      Returns:
      - the resolved public key or null if the key was not found
    • add

      boolean add(List<org.bouncycastle.openpgp.PGPPublicKey> publicKey) throws KeystoreOperationException
      records the public keys in the store for future use.
      Parameters:
      publicKey - - list of trusted public keys
      Returns:
      true if the public keys have been added successfully false otherwise.
      Throws:
      KeystoreOperationException - if the keystore threw an error during the operation