org.glite.slcs.pki
Class CertificateExtension

java.lang.Object
  extended by org.glite.slcs.pki.CertificateExtension

public class CertificateExtension
extends java.lang.Object

CertificateExtension wrapper class to create certificate extension.

Version:
$Revision: 1.2 $
Author:
Valery Tschopp

Constructor Summary
protected CertificateExtension(org.bouncycastle.asn1.DERObjectIdentifier oid, java.lang.String name, org.bouncycastle.asn1.x509.X509Extension extension, java.lang.String value)
          Creates an non-critical extension with the given extension OID and name and X509Extension and value.
protected CertificateExtension(org.bouncycastle.asn1.DERObjectIdentifier oid, java.lang.String name, org.bouncycastle.asn1.x509.X509Extension extension, java.lang.String value, boolean critical)
          Creates a CertificateExtension with the given extension OID and name and X509Extension and value.
protected CertificateExtension(org.bouncycastle.asn1.DERObjectIdentifier oid, org.bouncycastle.asn1.x509.X509Extension extension, boolean critical)
          Creates an extension with the given extension OID and X509Extension object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 org.bouncycastle.asn1.x509.X509Extension getExtension()
           
 java.lang.String getName()
           
 org.bouncycastle.asn1.DERObjectIdentifier getOID()
           
 java.lang.String getValue()
           
 int hashCode()
           
 boolean isCritical()
           
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateExtension

protected CertificateExtension(org.bouncycastle.asn1.DERObjectIdentifier oid,
                               java.lang.String name,
                               org.bouncycastle.asn1.x509.X509Extension extension,
                               java.lang.String value)
Creates an non-critical extension with the given extension OID and name and X509Extension and value.

Parameters:
oid - The OID of the extension.
name - The formal name of the extension.
extension - The X509Extension object.
value - The formal value of the X509Extension.

CertificateExtension

protected CertificateExtension(org.bouncycastle.asn1.DERObjectIdentifier oid,
                               org.bouncycastle.asn1.x509.X509Extension extension,
                               boolean critical)
Creates an extension with the given extension OID and X509Extension object.

The name is set to the OID and the value is set to NotParsed.

Parameters:
oid - The extension OID
extension - The X509Extension object.
critical - true iff the extension is critical.

CertificateExtension

protected CertificateExtension(org.bouncycastle.asn1.DERObjectIdentifier oid,
                               java.lang.String name,
                               org.bouncycastle.asn1.x509.X509Extension extension,
                               java.lang.String value,
                               boolean critical)
Creates a CertificateExtension with the given extension OID and name and X509Extension and value.

Parameters:
oid - The OID of the extension.
name - The formal name of the extension.
extension - The X509Extension object.
value - The formal value of the X509Extension.
critical - true iff the extension is critical.
Method Detail

getExtension

public org.bouncycastle.asn1.x509.X509Extension getExtension()
Returns:
Returns the X.509 extension.

getOID

public org.bouncycastle.asn1.DERObjectIdentifier getOID()
Returns:
Returns the oid.

isCritical

public boolean isCritical()
Returns:
If the extension is critical or not.

getName

public java.lang.String getName()
Returns:
The extension name or OID.

getValue

public java.lang.String getValue()
Returns:
the extension named value(s).

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toXML

public java.lang.String toXML()