Interface ExtraCertManager

  • All Known Implementing Classes:
    SingleCertManager

    public interface ExtraCertManager
    • Method Detail

      • addTemporaryCert

        void addTemporaryCert​(Certificate cert)
                       throws IOException,
                              GeneralSecurityException
        Add a certificate that will be accepted until some event (as determined by the implementation of this interface) occurs, causing it to be "forgotten".
        Parameters:
        cert - The certificate to add
        Throws:
        IOException - if there is an I/O or format problem with the keystore data, if a password is required but not given, or if the given password was incorrect
        GeneralSecurityException - if there is a problem reading/writing data within the keystore
      • addPermanentCert

        void addPermanentCert​(Certificate cert)
                       throws IOException,
                              GeneralSecurityException
        Add a certificate that will be accepted until this manager is "purged". Certificates added in this way will generally be written to disk, and will be available upon restarting the program.
        Parameters:
        cert - The certificate to add
        Throws:
        IOException - if there is an I/O or format problem with the keystore data, if a password is required but not given, or if the given password was incorrect
        GeneralSecurityException - if there is a problem reading/writing data within the keystore
      • asKeyStore

        KeyStore asKeyStore()
                     throws GeneralSecurityException
        Return a representation of this manager as a KeyStore instance.
        Returns:
        A new KeyStore that represents the contents of this certificate manager
        Throws:
        GeneralSecurityException - if there is a problem reading/writing data within the keystore