at.knowcenter.wag.egov.egiz.sig
Class X509Cert

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.sig.X509Cert
All Implemented Interfaces:
Serializable

public class X509Cert
extends Object
implements Serializable

See Also:
Serialized Form

Method Summary
 String getCertDigest()
           
 String getCertString()
           
 List getExtendedKeyUsage()
           
 String getIssuerName()
           
 PublicKey getPublicKey()
           
 String getSerialNumber()
           
 String getSigAlgName()
           
 String getSigAlgOID()
           
 String getSubjectName()
           
 byte[] getTBSCertificate()
           
 X509Certificate getX509Certificate()
           
static X509Cert initByByteArray(byte[] data)
           
static X509Cert initByFile(File certFile)
          This method initialzes a X509Certificate by a file value.
static X509Cert initByFilePath(String filePath)
          This method initialzes a X509Certificate by a file path value.
static X509Cert initByString(String certString)
          This method initialzes a X509Certificate by a string value.
 boolean isRSA()
          This method checks, if a X509Certificate has a public key with the rsa algorithm.
 boolean isX509Cert()
          This method checks if a certificate file is X509 conform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initByString

public static X509Cert initByString(String certString)
This method initialzes a X509Certificate by a string value. It must be coded Base64 or as plain binary stream.

Parameters:
certString - the certificate string to analyse
Returns:
the X509Cert object
See Also:
CertificateFactory, X509Certificate

initByByteArray

public static X509Cert initByByteArray(byte[] data)

initByFilePath

public static X509Cert initByFilePath(String filePath)
This method initialzes a X509Certificate by a file path value. The file must be a plain binary file like .cer format.

Parameters:
filePath - the certificate file to analyse
Returns:
the X509Cert object
See Also:
CertificateFactory, X509Certificate

initByFile

public static X509Cert initByFile(File certFile)
This method initialzes a X509Certificate by a file value. The file must be a plain binary file like .cer format.

Parameters:
certFile - the certificate file to analyse
Returns:
the X509Cert object
See Also:
CertificateFactory, X509Certificate

isX509Cert

public boolean isX509Cert()
This method checks if a certificate file is X509 conform.

Returns:
true if a certificate file is X509 conform, false otherwise

getCertDigest

public String getCertDigest()
Returns:
Returns the certificate digest value.

getCertString

public String getCertString()
Returns:
Returns the certificate Base64 binary string.

getIssuerName

public String getIssuerName()
Returns:
Returns the issuer string.

getSerialNumber

public String getSerialNumber()
Returns:
Returns the serial number.

getX509Certificate

public X509Certificate getX509Certificate()
Returns:
Returns the real X509Certifcate object.
See Also:
X509Certificate

getSubjectName

public String getSubjectName()
Returns:
Returns the subject name.

getTBSCertificate

public byte[] getTBSCertificate()
                         throws CertificateEncodingException
Throws:
CertificateEncodingException

getSigAlgName

public String getSigAlgName()

getSigAlgOID

public String getSigAlgOID()

getExtendedKeyUsage

public List getExtendedKeyUsage()

getPublicKey

public PublicKey getPublicKey()
Returns:
the public key of the X509Certificate

isRSA

public boolean isRSA()
This method checks, if a X509Certificate has a public key with the rsa algorithm.

Returns:
true if the public key is produced with rsa, false otherwise


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.