Class FileBasedOpenPgpTrustStore

java.lang.Object
org.jivesoftware.smackx.ox.store.abstr.AbstractOpenPgpTrustStore
org.jivesoftware.smackx.ox.store.filebased.FileBasedOpenPgpTrustStore
All Implemented Interfaces:
OpenPgpTrustStore

public class FileBasedOpenPgpTrustStore extends AbstractOpenPgpTrustStore
Implementation of the OpenPgpTrustStore which stores information in a directory structure.
 
 <basePath>/
     <userjid@server.tld>/
         <fingerprint>.trust      // Trust record for a key
 
 
  • Constructor Details

    • FileBasedOpenPgpTrustStore

      public FileBasedOpenPgpTrustStore(File basePath)
  • Method Details

    • TRUST_RECORD

      public static String TRUST_RECORD(org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
    • readTrust

      protected OpenPgpTrustStore.Trust readTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException
      Description copied from class: AbstractOpenPgpTrustStore
      Read the trust record for the key with fingerprint fingerprint of user owner from local storage. This method returns OpenPgpTrustStore.Trust.undecided in case that no trust record has been found.
      Specified by:
      readTrust in class AbstractOpenPgpTrustStore
      Parameters:
      owner - owner of the key
      fingerprint - fingerprint of the key
      Returns:
      trust state of the key
      Throws:
      IOException - IO is dangerous
    • writeTrust

      protected void writeTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException
      Description copied from class: AbstractOpenPgpTrustStore
      Write the trust record for the key with fingerprint fingerprint of user owner to local storage.
      Specified by:
      writeTrust in class AbstractOpenPgpTrustStore
      Parameters:
      owner - owner of the key
      fingerprint - fingerprint of the key
      trust - trust state of the key
      Throws:
      IOException - IO is dangerous