public class FileBasedOpenPgpTrustStore extends AbstractOpenPgpTrustStore
OpenPgpTrustStore
which stores information in a directory structure.
<basePath>/
<userjid@server.tld>/
<fingerprint>.trust // Trust record for a key
OpenPgpTrustStore.Trust
Constructor and Description |
---|
FileBasedOpenPgpTrustStore(File basePath) |
Modifier and Type | Method and Description |
---|---|
protected OpenPgpTrustStore.Trust |
readTrust(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Read the trust record for the key with fingerprint
fingerprint of user owner from local storage. |
static String |
TRUST_RECORD(org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) |
protected void |
writeTrust(org.jxmpp.jid.BareJid owner,
org.pgpainless.key.OpenPgpV4Fingerprint fingerprint,
OpenPgpTrustStore.Trust trust)
Write the trust record for the key with fingerprint
fingerprint of user owner to local storage. |
getTrust, setTrust
public FileBasedOpenPgpTrustStore(File basePath)
public static String TRUST_RECORD(org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
protected OpenPgpTrustStore.Trust readTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException
AbstractOpenPgpTrustStore
fingerprint
of user owner
from local storage.
This method returns Trust#undecided
in case that no trust record has been found.readTrust
in class AbstractOpenPgpTrustStore
owner
- owner of the keyfingerprint
- fingerprint of the keyIOException
- IO is dangerousprotected void writeTrust(org.jxmpp.jid.BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust) throws IOException
AbstractOpenPgpTrustStore
fingerprint
of user owner
to local storage.writeTrust
in class AbstractOpenPgpTrustStore
owner
- owner of the keyfingerprint
- fingerprint of the keytrust
- trust state of the keyIOException
- IO is dangerous