Package com.enterprisedt.net.ftp.ssl
Class SSLFTPCertificate
java.lang.Object
com.enterprisedt.net.ftp.ssl.SSLFTPCertificate
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classExtension of a certificate.static classDistinguished Name (DN) of an entity. -
Constructor Summary
ConstructorsConstructorDescriptionSSLFTPCertificate(Certificate certificate) Constructs anSSLFTPCertificateinstance from the givenCertificate. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]Returns the raw DER encoding of the certificate.Returns a vector containing the extensions of the certificate.Returns the Distinguished Name of the issuer of the certificate ornullif there isn't one.Returns the serial number of the certificate.Returns the Distinguished Name of the subject of the certificate.Returns the end of the period of validity of the certificate.Returns the start-date of the period of validity of the certificate.toString()toString(boolean showHeader) voidwritePEM(OutputStream outStr) Writes the certificate in PEM format to the givenOutputStream.voidWrites the certificate in PEM format to the givenWriter.
-
Constructor Details
-
SSLFTPCertificate
Constructs anSSLFTPCertificateinstance from the givenCertificate.- Parameters:
certificate-Certificate- Throws:
SSLFTPCertificateException- thrown if the certificate was found to be invalid.
-
-
Method Details
-
getCertDER
public byte[] getCertDER()Returns the raw DER encoding of the certificate.- Returns:
- byte-array containing the DER.
-
getExtensions
Returns a vector containing the extensions of the certificate.- Returns:
- A vector of
SSLFTPCertificate.CertificateExtensionobjects.
-
getIssuerName
Returns the Distinguished Name of the issuer of the certificate ornullif there isn't one.- Returns:
- Distinguished Name or
null.
-
getSerial
Returns the serial number of the certificate.- Returns:
- Serial Number.
-
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
Returns the end of the period of validity of the certificate.- Returns:
- The end-date.
-
getValidityNotBefore
Returns the start-date of the period of validity of the certificate.- Returns:
- The start-date.
-
writePEM
Writes the certificate in PEM format to the givenOutputStream.- Parameters:
outStr-OutputStreamto write to.- Throws:
IOException- Thrown if an error occurred while writing the certificate.
-
writePEM
Writes the certificate in PEM format to the givenWriter.- Parameters:
writer- Writer to write to- Throws:
IOException- Thrown if an error occurred while writing the certificate.
-
toString
-
toString
-
equals
-