Class CertificateStoreImpl

  • All Implemented Interfaces:
    org.iqtig.pseudonymisierung.api.CertificateStore

    public class CertificateStoreImpl
    extends AbstractTool
    implements org.iqtig.pseudonymisierung.api.CertificateStore
    Author:
    Klaus Buchwald, Michael Buckendahl
    See Also:
    AbstractTool
    • Constructor Detail

      • CertificateStoreImpl

        public CertificateStoreImpl​(Path registrationDir,
                                    org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity,
                                    String password)
                             throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Erzeugt eine CertificateStore-Instanz für private und öffentliche Schlüssel.
        Parameters:
        registrationDir - Path
        certificateIdentity - CertificateIdentity
        password - String der Zertifikate
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException - im Fehlerfall
      • CertificateStoreImpl

        public CertificateStoreImpl​(Path registrationDir,
                                    org.iqtig.pseudonymisierung.beans.CertificateIdentity certificateIdentity)
                             throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Erzeugt eine CertificateStore-Instanz für öffentliche Schlüssel.
        Parameters:
        registrationDir - Path
        certificateIdentity - CertificateIdentity
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException - im Fehlerfall
      • CertificateStoreImpl

        public CertificateStoreImpl​(Properties properties)
                             throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Erzeugt eine CertificateStore-Instanz

        Die Übergebenen Properties müssen folgende Schlüssel-Wert-Paare enthalten:
        certificate.datacollectionpoint = Die String-Repräsentation des entsprechenden DataCollectionPoint
        certificate.stateCode = Die String-Repräsentation des entsprechenden StateCode
        registration.dir = Das Schlüssel-Registrierungsverzeichnis

        Um auch private Schlüssel über diesen CertificateStore zu verwalten wird das Passwort der Zertifikate benötigt: certificate.password = Das Passwort der Zertifikate mit den privaten Schlüsseln
        Parameters:
        properties - Properties
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException - im Fehlerfall
    • Method Detail

      • getPrivateKey

        public PrivateKey getPrivateKey()
                                 throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Specified by:
        getPrivateKey in interface org.iqtig.pseudonymisierung.api.CertificateStore
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException
      • getPrivateKey

        public PrivateKey getPrivateKey​(Date date)
                                 throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Specified by:
        getPrivateKey in interface org.iqtig.pseudonymisierung.api.CertificateStore
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException
      • getPrivateKey

        public PrivateKey getPrivateKey​(Calendar date)
                                 throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Specified by:
        getPrivateKey in interface org.iqtig.pseudonymisierung.api.CertificateStore
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException
      • getPublicCertificate

        public X509Certificate getPublicCertificate()
                                             throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Specified by:
        getPublicCertificate in interface org.iqtig.pseudonymisierung.api.CertificateStore
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException
      • getPublicCertificate

        public X509Certificate getPublicCertificate​(Date date)
                                             throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Specified by:
        getPublicCertificate in interface org.iqtig.pseudonymisierung.api.CertificateStore
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException
      • getPublicCertificate

        public X509Certificate getPublicCertificate​(Calendar date)
                                             throws org.iqtig.pseudonymisierung.exception.PseudonymisationException
        Specified by:
        getPublicCertificate in interface org.iqtig.pseudonymisierung.api.CertificateStore
        Throws:
        org.iqtig.pseudonymisierung.exception.PseudonymisationException
      • getCertificateIdentity

        public org.iqtig.pseudonymisierung.beans.CertificateIdentity getCertificateIdentity()
        Specified by:
        getCertificateIdentity in interface org.iqtig.pseudonymisierung.api.CertificateStore