Class cryptiX.user.X509CertRequest
All Packages Class Hierarchy This Package Previous Next Index
Class cryptiX.user.X509CertRequest
java.lang.Object
|
+----cryptiX.user.X509CertRequest
- public class X509CertRequest
- extends Object
This class represents a X509 certificate request.
-
X509CertRequest()
- default constructor
-
X509CertRequest(byte[])
- create a x509CertRequest form a PEM or DER array
-
X509CertRequest(String)
- create a x509CertRequest form a PEM or DER file
-
publicKey()
- returns the public key of this certificate request
-
saveFormat()
- returns the file format (ASN1.DER, ASN1.PEM) of the cert request
-
saveToFile(String)
- saves the certificate request to a file
-
setPublicKey(PublicKey)
- sets the public key of this certificate request
-
setSaveFormat(int)
- sets the file format (ASN1.DER, ASN1.PEM) of the cert request
-
setSignatureAlgorithmID(String)
- sets the signature algorithm of this certificate request
-
setSubject(Name)
- sets the subject of this certificate request
-
setVersion(int)
- sets the version of this certificate request
-
signatureAlgorithmID()
- returns the signature algorithm of this certificate request
-
signCertRequest(PrivateKey)
- signs the certificate with the private key of the issuer
-
subject()
- returns the subject of this certificate request
-
toDER()
- returns the DER format of the certificate request
-
toPEM()
- returns the PEM format of the certificate request
-
toString()
- converts the certificate request to a text output
-
verify()
- verifies the self signed certificate request
-
version()
- returns the version of this certificate request
X509CertRequest
public X509CertRequest(String fileName) throws IOException, CodingException
- create a x509CertRequest form a PEM or DER file
X509CertRequest
public X509CertRequest(byte arr[]) throws CodingException
- create a x509CertRequest form a PEM or DER array
X509CertRequest
public X509CertRequest()
- default constructor
signCertRequest
public void signCertRequest(PrivateKey issuerSK) throws CodingException
- signs the certificate with the private key of the issuer
- Parameters:
- issuerSK - the private key of the issuer
verify
public boolean verify() throws CodingException
- verifies the self signed certificate request
- Parameters:
- signerPK - the public key from the signer
- Returns:
- true if signature OK
toPEM
public byte[] toPEM()
- returns the PEM format of the certificate request
toDER
public byte[] toDER()
- returns the DER format of the certificate request
saveToFile
public void saveToFile(String fileName) throws IOException
- saves the certificate request to a file
- Parameters:
- fileName - name of the file
- pemFormat - true, if file format should be PEM
false, if file format should be DER
toString
public String toString()
- converts the certificate request to a text output
- Overrides:
- toString in class Object
setSaveFormat
public void setSaveFormat(int format)
- sets the file format (ASN1.DER, ASN1.PEM) of the cert request
setVersion
public void setVersion(int v)
- sets the version of this certificate request
setSignatureAlgorithmID
public void setSignatureAlgorithmID(String said)
- sets the signature algorithm of this certificate request
setSubject
public void setSubject(Name su)
- sets the subject of this certificate request
setPublicKey
public void setPublicKey(PublicKey pk)
- sets the public key of this certificate request
saveFormat
public int saveFormat()
- returns the file format (ASN1.DER, ASN1.PEM) of the cert request
version
public int version()
- returns the version of this certificate request
signatureAlgorithmID
public String signatureAlgorithmID()
- returns the signature algorithm of this certificate request
subject
public Name subject()
- returns the subject of this certificate request
publicKey
public PublicKey publicKey()
- returns the public key of this certificate request
All Packages Class Hierarchy This Package Previous Next Index