Class CertificateSerialNumber
java.lang.Object
org.mozilla.jss.netscape.security.x509.CertificateSerialNumber
- All Implemented Interfaces:
CertAttrSet
This class defines the SerialNumber attribute for the Certificate.
- Version:
- 1.6
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCertificateSerialNumber
(int num) Default constructor for the certificate attribute.Create the object, decoding the values from the passed stream.Default constructor for the certificate attribute.Create the object, decoding the values from the passed DER stream.Create the object, decoding the values from the passed DerValue. -
Method Summary
Modifier and TypeMethodDescriptionvoid
decode
(InputStream in) Decode the serial number in DER form from the stream.void
Delete the attribute value.void
encode
(OutputStream out) Encode the serial number in DER form to the stream.Get the attribute value.Return an enumeration of names of attributes existing within this attribute.getName()
Return the name of this attribute.void
Set the attribute value.toString()
Return the serial number as user readable string.
-
Field Details
-
IDENT
Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.- See Also:
-
NAME
Sub attributes name for this CertAttrSet.- See Also:
-
NUMBER
- See Also:
-
serial
-
-
Constructor Details
-
CertificateSerialNumber
Default constructor for the certificate attribute.- Parameters:
num
- the serial number for the certificate.
-
CertificateSerialNumber
public CertificateSerialNumber(int num) Default constructor for the certificate attribute.- Parameters:
num
- the serial number for the certificate.
-
CertificateSerialNumber
Create the object, decoding the values from the passed DER stream.- Parameters:
in
- the DerInputStream to read the serial number from.- Throws:
IOException
- on decoding errors.
-
CertificateSerialNumber
Create the object, decoding the values from the passed stream.- Parameters:
in
- the InputStream to read the serial number from.- Throws:
IOException
- on decoding errors.
-
CertificateSerialNumber
Create the object, decoding the values from the passed DerValue.- Parameters:
val
- the DER encoded value.- Throws:
IOException
- on decoding errors.
-
-
Method Details
-
toString
Return the serial number as user readable string.- Specified by:
toString
in interfaceCertAttrSet
- Overrides:
toString
in classObject
- Returns:
- value of this certificate attribute in printable form.
-
encode
Encode the serial number in DER form to the stream.- Specified by:
encode
in interfaceCertAttrSet
- Parameters:
out
- the DerOutputStream to marshal the contents to.- Throws:
IOException
- on errors.
-
decode
Decode the serial number in DER form from the stream.- Specified by:
decode
in interfaceCertAttrSet
- Parameters:
in
- the InputStream to marshal the contents from.- Throws:
IOException
- on errors.
-
set
Set the attribute value.- Specified by:
set
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute (e.g. "x509.info.key")obj
- the attribute object.- Throws:
IOException
- on other errors.
-
get
Get the attribute value.- Specified by:
get
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to return.- Returns:
- attribute value
- Throws:
IOException
- on other errors.
-
delete
Delete the attribute value.- Specified by:
delete
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to delete.- Throws:
IOException
- on other errors.
-
getAttributeNames
Return an enumeration of names of attributes existing within this attribute.- Specified by:
getAttributeNames
in interfaceCertAttrSet
- Returns:
- an enumeration of the attribute names.
-
getName
Return the name of this attribute.- Specified by:
getName
in interfaceCertAttrSet
- Returns:
- the name of this CertAttrSet.
-