Interface PkiManager

All Known Implementing Classes:
PkiManagerImpl

public interface PkiManager
Interface describing the methods of the PkiManager.
Interface welches die Methoden des PkiManagers beschreibt.
  • Field Details

    • TYPE_JCEKS

      static final String TYPE_JCEKS
      The proprietary keystore implementation provided by the SunJCE provider.
      See Also:
    • TYPE_JKS

      static final String TYPE_JKS
      The proprietary keystore implementation provided by the SUN provider.
      See Also:
    • TYPE_PKCS12

      static final String TYPE_PKCS12
      The transfer syntax for personal identity information as defined in PKCS #12.
      See Also:
  • Method Details

    • addClientKeyAndCert

      void addClientKeyAndCert(File privateKeyPemPath, File clientCertPemPath, String alias, KeyStore keyStore, String aKeyPassword) throws KeyStoreException
      Method to registers a Client Key/Certificate in the KeyStore.
      Methode um ein ClientKey/Zertifikat im KeyStore zu registrieren.
      Parameters:
      privateKeyPemPath -
      the path of the file with the private key
      der Pfad des Ffiles mit dem privaten Schlüssel
      clientCertPemPath -
      the path of the pem file of the certificate
      der Pfad des pem Files des Zertifikates
      alias -
      the alias the key and cert should be referenced with
      der Alias unter dem der Schlüssel und das Zertifikat referenziert werden soll
      keyStore -
      the keystore the client key/certificate should be addded to
      Der keystore in dem Schlüssel/Zertifikat hinzugefügt werden soll
      aKeyPassword -
      the password of the key
      das Passwort des Keys
      Throws:
      KeyStoreException -
      will be thrown when an error occures storing the KeyStore to filesystem
      wird geworfen wenn ein Fehler beim Speichern des KeyStores ins Filesystem auftritt
    • addPublicCert

      void addPublicCert(File publicCertPemPath, String alias, KeyStore keyStore) throws KeyStoreException
      Method to add a certificate to a keystore.
      Methode um ein öffentliches Zertifikat im Key Store zu registrieren.
      Parameters:
      publicCertPemPath -
      the path of the file the certificate is stored in
      der Pfad des Files des Zertifikates
      alias -
      the alias the cert should be referenced with
      der Alias unter dem das Zertifikat referenziert werden soll
      keyStore -
      the keystore the certificate should be addded to
      Der Keystore dem das Zertifikat hinzugefügt werden soll
      Throws:
      KeyStoreException -
      will be thrown when an error occures storing the KeyStore to filesystem
      wird geworfen wenn ein Fehler beim Speichern des KeyStores ins Filesystem auftritt
    • createNewStore

      KeyStore createNewStore(String storeType) throws KeyStoreException
      Method to create a new KeyStore. The Keystore is not saved.
      Methode um einen neuen KeyStore zu erstellen. Der Keystore wird nicht gespeichert.
      Parameters:
      storeType -
      the type of the key store (see TYPE_JKS, @link #TYPE_JCEKS}, @link #TYPE_PKCS12}).
      der Typ des Keystore (siehe TYPE_JKS, TYPE_JCEKS, TYPE_PKCS12).
      Returns:
      the KeyStore loaded from file.
      der KeyStore geladen vom File.
      Throws:
      KeyStoreException -
      will be thrown when an error occures loading the KeyStore from filesystem.
      wird geworfen wenn ein Fehler beim Laden des KeyStores aus dem Filesystem auftritt
    • listCertificateAliases

      List<String> listCertificateAliases(KeyStore keyStore) throws KeyStoreException
      Method to list all registered certificates.
      Methode zum Auflisten der registrierten Zertifikate.
      Parameters:
      keyStore -
      the keystore
      Der Keystore
      Returns:
      a List of all certificate aliases
      Eine List von allen Zertifikat Aliases
      Throws:
      KeyStoreException -
      will be thrown when an error occures storing the KeyStore to filesystem
      wird geworfen wenn ein Fehler beim Speichern des KeyStores ins Filesystem auftritt
    • listCertificates

      List<Certificate> listCertificates(KeyStore keyStore) throws KeyStoreException
      Method to list all registered certificates.
      Methode zum Auflisten der registrierten Zerifikate.
      Parameters:
      keyStore -
      the keystore
      Der Keystore
      Returns:
      a List of all certificates
      Eine List von allen Zertifikaten
      Throws:
      KeyStoreException -
      will be thrown when an error occures storing the KeyStore to filesystem
      wird geworfen wenn ein Fehler beim Speichern des KeyStores ins Filesystem auftritt
    • loadStore

      KeyStore loadStore(InputStream storeInputStream, String storePassword, String storeType) throws KeyStoreException
      Method to load the KeyStore from filesystem.
      Methode welches den KeyStore vom Filesystem lädt.
      Parameters:
      storeInputStream -
      the InputStream of the KeyStore file.
      der InputStream des KeyStore Files.
      storePassword -
      the password of the KeyStore
      das Passwort des KeyStore
      storeType -
      the type of the key store (see TYPE_JKS, @link #TYPE_JCEKS}, @link #TYPE_PKCS12}).
      der Typ des Keystore (siehe TYPE_JKS, TYPE_JCEKS, TYPE_PKCS12).
      Returns:
      the KeyStore loaded from file.
      der KeyStore geladen vom File.
      Throws:
      KeyStoreException -
      will be thrown when an error occures loading the KeyStore
      wird geworfen wenn ein Fehler beim Laden des KeyStores auftritt
    • removeCert

      void removeCert(String alias, KeyStore keyStore) throws KeyStoreException
      Removes an Entry from the KeyStore referenced by an alias.
      Entfernt ein Eintrag referenziert durch den Alias aus dem KeyStore.
      Parameters:
      alias -
      the alias the key and cert should be referenced with
      der Alias unter dem der Schlüssel und das Zertifikat referenziert werden soll
      keyStore -
      the keystore the certificate should be removed from
      Der Keystore dem das Zertifikat entfernt werden soll
      Throws:
      KeyStoreException -
      will be thrown when an error occures storing the KeyStore to filesystem
      wird geworfen wenn ein Fehler beim Speichern des KeyStores ins Filesystem auftritt
    • storeStore

      void storeStore(KeyStore keyStore, OutputStream storeOutputStream, String storePassword) throws KeyStoreException
      Method to store a KeyStore into a file.
      Methode zum Speichern eines KeyStore in ein File.
      Parameters:
      keyStore -
      the keystore the certificate should be addded to
      Der Keystore dem das Zertifikat hinzugefügt werden soll
      storeOutputStream -
      the OutputStream of the file the keystore to be stored in
      der OutputStream des Files in dem der Keystore gespeichert wird
      storePassword -
      the password of the KeyStore
      das Passwort des KeyStore
      Throws:
      KeyStoreException -
      will be thrown when an error occures storing the KeyStore to filesystem
      wird geworfen wenn ein Fehler beim Speichern des KeyStores ins Filesystem auftritt