Package pgp.cert_d
Interface ReadOnlyPGPCertificateDirectory
-
- All Known Implementing Classes:
PGPCertificateDirectory
public interface ReadOnlyPGPCertificateDirectoryInterface for a read-only OpenPGP certificate directory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Iterator<java.lang.String>fingerprints()Get the fingerprints of all certificates in the directory, except for certificates which are stored by special name.pgp.certificate_store.certificate.CertificategetByFingerprint(java.lang.String fingerprint)Get the certificate identified by the given fingerprint.pgp.certificate_store.certificate.CertificategetByFingerprintIfChanged(java.lang.String fingerprint, long tag)Get the certificate identified by the given fingerprint if it has changed.pgp.certificate_store.certificate.CertificategetBySpecialName(java.lang.String specialName)Get the certificate identified by the given special name.pgp.certificate_store.certificate.CertificategetBySpecialNameIfChanged(java.lang.String specialName, long tag)Get the certificate identified by the given special name or null, if it has not been changed.pgp.certificate_store.certificate.CertificategetTrustRootCertificate()Get the trust-root certificate.pgp.certificate_store.certificate.CertificategetTrustRootCertificateIfChanged(long tag)Get the trust-root certificate if it has changed.java.util.Iterator<pgp.certificate_store.certificate.Certificate>items()Get all certificates in the directory, except for certificates which are stored by special name.
-
-
-
Method Detail
-
getTrustRootCertificate
pgp.certificate_store.certificate.Certificate getTrustRootCertificate() throws java.io.IOException, pgp.certificate_store.exception.BadDataExceptionGet the trust-root certificate. This is a certificate which is stored under the special nametrust-root
.- Returns:
- trust-root certificate
- Throws:
java.io.IOException- in case of an IO errorpgp.certificate_store.exception.BadDataException- if the certificate contains bad datajava.util.NoSuchElementException- if no such certificate is found
-
getTrustRootCertificateIfChanged
pgp.certificate_store.certificate.Certificate getTrustRootCertificateIfChanged(long tag) throws java.io.IOException, pgp.certificate_store.exception.BadDataExceptionGet the trust-root certificate if it has changed. This method uses thetag
to calculate if the certificate might have changed. If the computed tag equals the given tag, the certificate has not changed, sonull
is returned. Otherwise. the changed certificate is returned.- Parameters:
tag- tag- Returns:
- changed certificate, or null if the certificate is unchanged.
- Throws:
java.io.IOException- in case of an IO errorpgp.certificate_store.exception.BadDataException- if the certificate contains bad datajava.util.NoSuchElementException- if no such certificate is found
-
getByFingerprint
pgp.certificate_store.certificate.Certificate getByFingerprint(java.lang.String fingerprint) throws java.io.IOException, pgp.certificate_store.exception.BadNameException, pgp.certificate_store.exception.BadDataExceptionGet the certificate identified by the given fingerprint.- Parameters:
fingerprint- lower-case fingerprint of the certificate- Returns:
- certificate
- Throws:
java.io.IOException- in case of an IO errorpgp.certificate_store.exception.BadNameException- if the fingerprint is malformedpgp.certificate_store.exception.BadDataException- if the certificate contains bad datajava.util.NoSuchElementException- if no such certificate is found
-
getByFingerprintIfChanged
pgp.certificate_store.certificate.Certificate getByFingerprintIfChanged(java.lang.String fingerprint, long tag) throws java.io.IOException, pgp.certificate_store.exception.BadNameException, pgp.certificate_store.exception.BadDataExceptionGet the certificate identified by the given fingerprint if it has changed. This method uses thetag
to calculate, if the certificate might have changed. If the computed tag equals the given tag, the certificate has not changed, sonull
is returned. Otherwise, the changed certificate is returned.- Parameters:
fingerprint- lower-case fingerprint of the certificatetag- tag- Returns:
- certificate or null if the certificate has not been changed
- Throws:
java.io.IOException- in case of an IO errorpgp.certificate_store.exception.BadNameException- if the fingerprint is malformedpgp.certificate_store.exception.BadDataException- if the certificate contains bad datajava.util.NoSuchElementException- if no such certificate is found
-
getBySpecialName
pgp.certificate_store.certificate.Certificate getBySpecialName(java.lang.String specialName) throws java.io.IOException, pgp.certificate_store.exception.BadNameException, pgp.certificate_store.exception.BadDataExceptionGet the certificate identified by the given special name.- Parameters:
specialName- special name- Returns:
- certificate
- Throws:
java.io.IOException- in case of an IO errorpgp.certificate_store.exception.BadNameException- if the special name is not knownpgp.certificate_store.exception.BadDataException- if the certificate contains bad datajava.util.NoSuchElementException- if no such certificate is found
-
getBySpecialNameIfChanged
pgp.certificate_store.certificate.Certificate getBySpecialNameIfChanged(java.lang.String specialName, long tag) throws java.io.IOException, pgp.certificate_store.exception.BadNameException, pgp.certificate_store.exception.BadDataExceptionGet the certificate identified by the given special name or null, if it has not been changed. This method uses thetag
to calculate, if the certificate might have changed. If the computed tag equals the given tag, the certificate has not changed, sonull
is returned. Otherwise, the changed certificate is returned.- Parameters:
specialName- special nametag- tag- Returns:
- certificate or null
- Throws:
java.io.IOException- in case of an IO errorpgp.certificate_store.exception.BadNameException- if the special name is not knownpgp.certificate_store.exception.BadDataException- if the certificate contains bad datajava.util.NoSuchElementException- if no such certificate is found
-
items
java.util.Iterator<pgp.certificate_store.certificate.Certificate> items()
Get all certificates in the directory, except for certificates which are stored by special name.- Returns:
- iterator of certificates
-
fingerprints
java.util.Iterator<java.lang.String> fingerprints()
Get the fingerprints of all certificates in the directory, except for certificates which are stored by special name.- Returns:
- iterator of fingerprints
-
-