All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.security.x509.CertificateVersion

netscape.security.x509.CertificateVersion

public class CertificateVersion
implements CertAttrSet
This class defines the version of the X509 Certificate.

See Also:
CertAttrSet

Variable Index

 o IDENT
Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
 o NAME
Sub attributes name for this CertAttrSet.
 o V1
X509Certificate Version 1
 o V2
X509Certificate Version 2
 o V3
X509Certificate Version 3
 o VERSION

Constructor Index

 o CertificateVersion()
The default constructor for this class, sets the version to 0 (i.e.
 o CertificateVersion(DerInputStream)
Create the object, decoding the values from the passed DER stream.
 o CertificateVersion(DerValue)
Create the object, decoding the values from the passed DerValue.
 o CertificateVersion(InputStream)
Create the object, decoding the values from the passed stream.
 o CertificateVersion(int)
The constructor for this class for the required version.

Method Index

 o compare(int)
Compare versions.
 o decode(InputStream)
Decode the CertificateVersion period in DER form from the stream.
 o delete(String)
Delete the attribute value.
 o encode(OutputStream)
Encode the CertificateVersion period in DER form to the stream.
 o get(String)
Get the attribute value.
 o getElements()
Return an enumeration of names of attributes existing within this attribute.
 o getName()
Return the name of this attribute.
 o set(String, Object)
Set the attribute value.
 o toString()
Return the version number of the certificate.

Variables

 o V1
 public static final int V1
X509Certificate Version 1

 o V2
 public static final int V2
X509Certificate Version 2

 o V3
 public static final int V3
X509Certificate Version 3

 o IDENT
 public static final String IDENT
Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.

 o NAME
 public static final String NAME
Sub attributes name for this CertAttrSet.

 o VERSION
 public static final String VERSION

Constructors

 o CertificateVersion
 public CertificateVersion()
The default constructor for this class, sets the version to 0 (i.e. X.509 version 1).

 o CertificateVersion
 public CertificateVersion(int version) throws IOException
The constructor for this class for the required version.

Parameters:
version - the version for the certificate.
Throws: IOException
if the version is not valid.
 o CertificateVersion
 public CertificateVersion(DerInputStream in) throws IOException
Create the object, decoding the values from the passed DER stream.

Parameters:
in - the DerInputStream to read the CertificateVersion from.
Throws: IOException
on decoding errors.
 o CertificateVersion
 public CertificateVersion(InputStream in) throws IOException
Create the object, decoding the values from the passed stream.

Parameters:
in - the InputStream to read the CertificateVersion from.
Throws: IOException
on decoding errors.
 o CertificateVersion
 public CertificateVersion(DerValue val) throws IOException
Create the object, decoding the values from the passed DerValue.

Parameters:
val - the Der encoded value.
Throws: IOException
on decoding errors.

Methods

 o toString
 public String toString()
Return the version number of the certificate.

 o encode
 public void encode(OutputStream out) throws IOException
Encode the CertificateVersion period in DER form to the stream.

Parameters:
out - the OutputStream to marshal the contents to.
Throws: IOException
on errors.
 o decode
 public void decode(InputStream in) throws IOException
Decode the CertificateVersion period in DER form from the stream.

Parameters:
in - the InputStream to unmarshal the contents from.
Throws: IOException
on errors.
 o set
 public void set(String name,
                 Object obj) throws IOException
Set the attribute value.

 o get
 public Object get(String name) throws IOException
Get the attribute value.

 o delete
 public void delete(String name) throws IOException
Delete the attribute value.

 o getElements
 public Enumeration getElements()
Return an enumeration of names of attributes existing within this attribute.

 o getName
 public String getName()
Return the name of this attribute.

 o compare
 public int compare(int vers)
Compare versions.


All Packages  Class Hierarchy  This Package  Previous  Next  Index