Class CertificateImportModel

    • Constructor Detail

      • CertificateImportModel

        public CertificateImportModel​(CertificateDetails certificateDetails,
                                      byte[] certificateData)
    • Method Detail

      • getDisplayName

        public String getDisplayName​(Locale locale)
        Description copied from interface: ICryptoImportElement
        The name of the cryptographic element. This is used to identify the element in the user interface.
        Specified by:
        getDisplayName in interface ICryptoImportElement
        Returns:
        the name of the cryptographic element
      • getInputStream

        public InputStream getInputStream()
        Description copied from interface: ICertificateImportModel
        Returns an InputStream that provides the data of the certificate to be imported. This stream should be closed by the caller after use to free resources.
        Specified by:
        getInputStream in interface ICertificateImportModel
        Returns:
        an InputStream containing the certificate data
      • getSubjectAlternative

        public X501DistinguishedName getSubjectAlternative()
        Returns the subject of the certificate by selecting the first applicable Subject Alternative Name (SAN) entry.
        Returns:
        the subject alternative name as an X501DistinguishedName, or null if no SAN entries are available.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getCertificateDetails

        public CertificateDetails getCertificateDetails()
        Description copied from interface: ICryptoImportElement
        Return information about the X.509 certificate associated with this entry. This includes details such as the subject name, fingerprint, and usage information of the certificate. Could be null!
        Specified by:
        getCertificateDetails in interface ICryptoImportElement
        Returns:
        the certificate details, or null if not applicable
      • getCertificateData

        public byte[] getCertificateData()
      • isMarkedForImport

        public boolean isMarkedForImport()
        Description copied from interface: ICertificateImportModel
        Returns whether the certificate is marked for import.
        Specified by:
        isMarkedForImport in interface ICertificateImportModel
        Returns:
        true if the certificate is marked for import, false otherwise (will be skipped during import)
      • setMarkedForImport

        public void setMarkedForImport​(boolean markedForImport)
        Description copied from interface: ICertificateImportModel
        Sets whether the certificate is marked for import.
        Specified by:
        setMarkedForImport in interface ICertificateImportModel
        Parameters:
        markedForImport - true to mark the certificate for import, false to skip it during import