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 theOpenPgpTrustStore
which stores information in a directory structure.<basePath>/ <userjid@server.tld>/ <fingerprint>.trust // Trust record for a key
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jivesoftware.smackx.ox.store.definition.OpenPgpTrustStore
OpenPgpTrustStore.Trust
-
-
Constructor Summary
Constructors Constructor Description FileBasedOpenPgpTrustStore(File basePath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OpenPgpTrustStore.Trust
readTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
Read the trust record for the key with fingerprintfingerprint
of userowner
from local storage.static String
TRUST_RECORD(org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
protected void
writeTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint, OpenPgpTrustStore.Trust trust)
Write the trust record for the key with fingerprintfingerprint
of userowner
to local storage.-
Methods inherited from class org.jivesoftware.smackx.ox.store.abstr.AbstractOpenPgpTrustStore
getTrust, setTrust
-
-
-
-
Constructor Detail
-
FileBasedOpenPgpTrustStore
public FileBasedOpenPgpTrustStore(File basePath)
-
-
Method Detail
-
TRUST_RECORD
public static String TRUST_RECORD(org.pgpainless.key.OpenPgpV4Fingerprint fingerprint)
-
readTrust
protected OpenPgpTrustStore.Trust readTrust(BareJid owner, org.pgpainless.key.OpenPgpV4Fingerprint fingerprint) throws IOException
Description copied from class:AbstractOpenPgpTrustStore
Read the trust record for the key with fingerprintfingerprint
of userowner
from local storage. This method returnsOpenPgpTrustStore.Trust.undecided
in case that no trust record has been found.- Specified by:
readTrust
in classAbstractOpenPgpTrustStore
- Parameters:
owner
- owner of the keyfingerprint
- fingerprint of the key- Returns:
- trust state of the key
- Throws:
IOException
- IO is dangerous
-
writeTrust
protected void writeTrust(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 fingerprintfingerprint
of userowner
to local storage.- Specified by:
writeTrust
in classAbstractOpenPgpTrustStore
- Parameters:
owner
- owner of the keyfingerprint
- fingerprint of the keytrust
- trust state of the key- Throws:
IOException
- IO is dangerous
-
-