Class cryptiX.user.X509Certificate
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptiX.user.X509Certificate

java.lang.Object
   |
   +----cryptiX.user.X509Certificate

public class X509Certificate
extends Object
This class represents a X509 certificate.

Constructor Index

 o X509Certificate()
default constructor
 o X509Certificate(byte[])
create a x509Certificate form a PEM or DER array
 o X509Certificate(String)
create a x509Certificate form a PEM or DER file

Method Index

 o fingerprint()
returns the fingerprint of this certificate
 o issuer()
returns the issuer of this certificate
 o netscapeFormat()
returns true if this cert is in netscape format
 o notAfterDate()
returns the not after date of this certificate
 o notBeforeDate()
returns the not before date of this certificate
 o publicKey()
returns the public key of this certificate
 o saveFormat()
returns the file format (ASN1.DER, ASN1.PEM) of the cert
 o saveToFile(String)
saves the certificate
 o serialNumber()
returns the serial number of this certificate
 o setIssuer(Name)
sets the issuer of this certificate
 o setNetscapeFormat(boolean)
sets this certificate to netscape format
 o setNotAfter(Date)
sets the not after date of this certificate
 o setNotBefore(Date)
sets the not before date of this certificate
 o setPublicKey(PublicKey)
sets the public key of this certificate
 o setSaveFormat(int)
sets the file format (ASN1.DER, ASN1.PEM) of the cert
 o setSerialNumber(BigInt)
sets the serial number of this certificate
 o setSignatureAlgorithmID(String)
sets the signature algorithm of this certificate
 o setSubject(Name)
sets the subject of this certificate
 o setVersion(int)
sets the version of this certificate
 o signatureAlgorithmID()
returns the signature algorithm of this certificate
 o signCertificate(PrivateKey)
signs the certificate with the private key of the issuer
 o subject()
returns the subject of this certificate
 o toDERArray()
returns the DER format of the certificate
 o toPEMArray()
returns the PEM format of the certificate
 o toSSLeay()
 o toString()
converts the certificate to a text output
 o verify()
verifies a self signed certificate
 o verify(PublicKey)
verifies a signed certificate
 o version()
returns the version of this certificate

Constructors

 o X509Certificate
  public X509Certificate(String fileName) throws IOException, CodingException
create a x509Certificate form a PEM or DER file
 o X509Certificate
  public X509Certificate(byte arr[]) throws CodingException
create a x509Certificate form a PEM or DER array
 o X509Certificate
  public X509Certificate()
default constructor

Methods

 o signCertificate
  public void signCertificate(PrivateKey issuerSK) throws CodingException
signs the certificate with the private key of the issuer
Parameters:
issuerSK - the private key of the issuer
 o verify
  public boolean verify() throws CodingException
verifies a self signed certificate
Returns:
true if signature OK
 o verify
  public boolean verify(PublicKey signerPK) throws CodingException
verifies a signed certificate
Parameters:
signerPK - the public key from the signer
Returns:
true if signature OK
 o toPEMArray
  public byte[] toPEMArray()
returns the PEM format of the certificate
 o toDERArray
  public byte[] toDERArray()
returns the DER format of the certificate
 o saveToFile
  public void saveToFile(String fileName) throws IOException
saves the certificate
Parameters:
fileName - the file name to use
 o toString
  public String toString()
converts the certificate to a text output
Overrides:
toString in class Object
 o setSaveFormat
  public void setSaveFormat(int format)
sets the file format (ASN1.DER, ASN1.PEM) of the cert
 o setNetscapeFormat
  public void setNetscapeFormat(boolean nf)
sets this certificate to netscape format
 o setVersion
  public void setVersion(int v)
sets the version of this certificate
 o setSerialNumber
  public void setSerialNumber(BigInt sn)
sets the serial number of this certificate
 o setSignatureAlgorithmID
  public void setSignatureAlgorithmID(String said)
sets the signature algorithm of this certificate
 o setIssuer
  public void setIssuer(Name is)
sets the issuer of this certificate
 o setNotBefore
  public void setNotBefore(Date nb)
sets the not before date of this certificate
 o setNotAfter
  public void setNotAfter(Date na)
sets the not after date of this certificate
 o setSubject
  public void setSubject(Name su)
sets the subject of this certificate
 o setPublicKey
  public void setPublicKey(PublicKey pk)
sets the public key of this certificate
 o saveFormat
  public int saveFormat()
returns the file format (ASN1.DER, ASN1.PEM) of the cert
 o netscapeFormat
  public boolean netscapeFormat()
returns true if this cert is in netscape format
 o version
  public int version()
returns the version of this certificate
 o serialNumber
  public BigInt serialNumber()
returns the serial number of this certificate
 o signatureAlgorithmID
  public String signatureAlgorithmID()
returns the signature algorithm of this certificate
 o issuer
  public Name issuer()
returns the issuer of this certificate
 o notBeforeDate
  public Date notBeforeDate()
returns the not before date of this certificate
 o notAfterDate
  public Date notAfterDate()
returns the not after date of this certificate
 o subject
  public Name subject()
returns the subject of this certificate
 o publicKey
  public PublicKey publicKey()
returns the public key of this certificate
 o fingerprint
  public byte[] fingerprint()
returns the fingerprint of this certificate
 o toSSLeay
  public String toSSLeay()

All Packages  Class Hierarchy  This Package  Previous  Next  Index