Class SSLFTPCertificate

java.lang.Object
com.enterprisedt.net.ftp.ssl.SSLFTPCertificate

public class SSLFTPCertificate extends Object
A SSLFTPCertificate contains information regarding an X.509 certificate. Details include:
Subject Name
Distinguished Name of the entity to which the certificate was issued.
Validity Period
Period in which the certificate is valid.
Issuer Name
Name of the entity which issued the certificate (usually a CA).
Serial Number
Serial number of the certificate.
Extensions
Any extensions that are included in the certificate.
Author:
Hans Andersen
  • Constructor Details

  • Method Details

    • getCertDER

      public byte[] getCertDER()
      Returns the raw DER encoding of the certificate.
      Returns:
      byte-array containing the DER.
    • getExtensions

      public Vector getExtensions()
      Returns a vector containing the extensions of the certificate.
      Returns:
      A vector of SSLFTPCertificate.CertificateExtension objects.
    • getIssuerName

      public SSLFTPCertificate.DistinguishedName getIssuerName()
      Returns the Distinguished Name of the issuer of the certificate or null if there isn't one.
      Returns:
      Distinguished Name or null.
    • getSerial

      public BigInteger getSerial()
      Returns the serial number of the certificate.
      Returns:
      Serial Number.
    • getSubjectName

      public SSLFTPCertificate.DistinguishedName getSubjectName()
      Returns the Distinguished Name of the subject of the certificate. The subject is the entity to which the certificate was issued.
      Returns:
      Distinguished Name
    • getValidityNotAfter

      public Date getValidityNotAfter()
      Returns the end of the period of validity of the certificate.
      Returns:
      The end-date.
    • getValidityNotBefore

      public Date getValidityNotBefore()
      Returns the start-date of the period of validity of the certificate.
      Returns:
      The start-date.
    • writePEM

      public void writePEM(OutputStream outStr) throws IOException
      Writes the certificate in PEM format to the given OutputStream.
      Parameters:
      outStr - OutputStream to write to.
      Throws:
      IOException - Thrown if an error occurred while writing the certificate.
    • writePEM

      public void writePEM(Writer writer) throws IOException
      Writes the certificate in PEM format to the given Writer.
      Parameters:
      writer - Writer to write to
      Throws:
      IOException - Thrown if an error occurred while writing the certificate.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(boolean showHeader)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object