Package pgp.cert_d

Interface ReadOnlyPGPCertificateDirectory

  • All Known Implementing Classes:
    PGPCertificateDirectory

    public interface ReadOnlyPGPCertificateDirectory
    Interface 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.Certificate getByFingerprint​(java.lang.String fingerprint)
      Get the certificate identified by the given fingerprint.
      pgp.certificate_store.certificate.Certificate getByFingerprintIfChanged​(java.lang.String fingerprint, long tag)
      Get the certificate identified by the given fingerprint if it has changed.
      pgp.certificate_store.certificate.Certificate getBySpecialName​(java.lang.String specialName)
      Get the certificate identified by the given special name.
      pgp.certificate_store.certificate.Certificate getBySpecialNameIfChanged​(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.Certificate getTrustRootCertificate()
      Get the trust-root certificate.
      pgp.certificate_store.certificate.Certificate getTrustRootCertificateIfChanged​(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.BadDataException
        Get the trust-root certificate. This is a certificate which is stored under the special name
        trust-root
        .
        Returns:
        trust-root certificate
        Throws:
        java.io.IOException - in case of an IO error
        pgp.certificate_store.exception.BadDataException - if the certificate contains bad data
        java.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.BadDataException
        Get the trust-root certificate if it has changed. This method uses the
        tag
        to calculate if the certificate might have changed. If the computed tag equals the given tag, the certificate has not changed, so
        null
        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 error
        pgp.certificate_store.exception.BadDataException - if the certificate contains bad data
        java.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.BadDataException
        Get 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 error
        pgp.certificate_store.exception.BadNameException - if the fingerprint is malformed
        pgp.certificate_store.exception.BadDataException - if the certificate contains bad data
        java.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.BadDataException
        Get the certificate identified by the given fingerprint if it has changed. This method uses the
        tag
        to calculate, if the certificate might have changed. If the computed tag equals the given tag, the certificate has not changed, so
        null
        is returned. Otherwise, the changed certificate is returned.
        Parameters:
        fingerprint - lower-case fingerprint of the certificate
        tag - tag
        Returns:
        certificate or null if the certificate has not been changed
        Throws:
        java.io.IOException - in case of an IO error
        pgp.certificate_store.exception.BadNameException - if the fingerprint is malformed
        pgp.certificate_store.exception.BadDataException - if the certificate contains bad data
        java.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.BadDataException
        Get the certificate identified by the given special name.
        Parameters:
        specialName - special name
        Returns:
        certificate
        Throws:
        java.io.IOException - in case of an IO error
        pgp.certificate_store.exception.BadNameException - if the special name is not known
        pgp.certificate_store.exception.BadDataException - if the certificate contains bad data
        java.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.BadDataException
        Get the certificate identified by the given special name or null, if it has not been changed. This method uses the
        tag
        to calculate, if the certificate might have changed. If the computed tag equals the given tag, the certificate has not changed, so
        null
        is returned. Otherwise, the changed certificate is returned.
        Parameters:
        specialName - special name
        tag - tag
        Returns:
        certificate or null
        Throws:
        java.io.IOException - in case of an IO error
        pgp.certificate_store.exception.BadNameException - if the special name is not known
        pgp.certificate_store.exception.BadDataException - if the certificate contains bad data
        java.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