Class CertificateInfoDTO

    • Constructor Detail

      • CertificateInfoDTO

        public CertificateInfoDTO​(Long id,
                                  int lockingVersion,
                                  de.xima.cmn.time.DateTimeRange validity,
                                  X501DistinguishedName issuer,
                                  X501DistinguishedName subject,
                                  String serialNumber,
                                  ECertificateType certificateType,
                                  ECertificateSource certificateSource,
                                  String keyAlgorithm,
                                  int keySize,
                                  Set<CertificateUsageDTO> usages,
                                  boolean hasPrivateKey,
                                  boolean hasCsr,
                                  boolean renewed,
                                  Instant lastCsrExport,
                                  Instant lastCaResponseImport,
                                  Instant createdAt,
                                  Instant updatedAt,
                                  KeyStoreScope keyStoreScope)
        Creates a new CertificateInfoDTO instance.
        Parameters:
        id - The (database) id of the certificate.
        lockingVersion - The (database) locking version of the corresponding entity.
        validity - The date time range of the certificate's validity.
        issuer - The issuer of the certificate in the form of a distinguished name (e.g. "CN=CA, OU=IT, O=XIMA").
        subject - The subject of the certificate in the form of a distinguished name (e.g. "CN=John Doe, OU=IT, O=XIMA").
        serialNumber - The serial number of the certificate.
        certificateType - The type of the certificate.
        certificateSource - The source of the certificate, which indicates how the certificate was created or obtained.
        keyAlgorithm - The key algorithm of the certificate.
        keySize - The key size of the certificate.
        usages - The usages of the certificate.
        hasPrivateKey - Whether the certificate has a private key in the database or not.
        hasCsr - Whether the certificate has a CSR (Certificate Signing Request) in the database or not.
        renewed - Whether the certificate has been renewed or not.
        lastCsrExport - The instant of the last export of the CSR (Certificate Signing Request).
        lastCaResponseImport - The instant of the last import of a CA (Certificate Authority) response to a CSR.
        createdAt - The creation instant.
        updatedAt - The last modification instant.
        keyStoreScope - The scope of the keystore the certificate is contained in.
    • Method Detail

      • isValid

        public boolean isValid​(Instant timestamp)
        Whether the certificate is valid for the given timestamp.
        Parameters:
        timestamp - The timestamp to check.
        Returns:
        true if the certificate is valid for the given timestamp, false otherwise.
      • getId

        public Long getId()
        The (database) id of the certificate.
      • getLockingVersion

        public int getLockingVersion()
        The (database) locking version of the corresponding entity.
      • getValidity

        public de.xima.cmn.time.DateTimeRange getValidity()
        The date time range of the certificate's validity.
      • getIssuer

        public X501DistinguishedName getIssuer()
        The issuer of the certificate in the form of a distinguished name (e.g. "CN=CA, OU=IT, O=XIMA").
      • getSubject

        public X501DistinguishedName getSubject()
        The subject of the certificate in the form of a distinguished name (e.g. "CN=John Doe, OU=IT, O=XIMA").
      • getSerialNumber

        public String getSerialNumber()
        The serial number of the certificate.
      • getCertificateType

        public ECertificateType getCertificateType()
        The type of the certificate.
      • getCertificateSource

        public ECertificateSource getCertificateSource()
        The source of the certificate, which indicates how the certificate was created or obtained.
      • getKeyAlgorithm

        public String getKeyAlgorithm()
        The key algorithm of the certificate.
      • getKeySize

        public int getKeySize()
        The key size of the certificate.
      • isHasPrivateKey

        public boolean isHasPrivateKey()
        Whether the certificate has a private key in the database or not.
      • isHasCsr

        public boolean isHasCsr()
        Whether the certificate has a CSR (Certificate Signing Request) in the database or not.
      • isRenewed

        public boolean isRenewed()
        Whether the certificate has been renewed or not.
      • getLastCsrExport

        public Instant getLastCsrExport()
        The instant of the last export of the CSR (Certificate Signing Request).
      • getLastCaResponseImport

        public Instant getLastCaResponseImport()
        The instant of the last import of a CA (Certificate Authority) response to a CSR.
      • getCreatedAt

        public Instant getCreatedAt()
        The creation instant.
      • getUpdatedAt

        public Instant getUpdatedAt()
        The last modification instant.
      • getKeyStoreScope

        public KeyStoreScope getKeyStoreScope()
        The scope of the keystore the certificate is contained in.
      • isAutoRenew

        public boolean isAutoRenew()
        Whether the certificate should be automatically renewed or not.
      • setAutoRenew

        public void setAutoRenew​(boolean autoRenew)
        Whether the certificate should be automatically renewed or not.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object