Class IssuingDistributionPointExtension
java.lang.Object
org.mozilla.jss.netscape.security.x509.Extension
org.mozilla.jss.netscape.security.x509.IssuingDistributionPointExtension
- All Implemented Interfaces:
Serializable
,CertAttrSet
A critical CRL extension that identifies the CRL distribution point
for a particular CRL
issuingDistributionPoint ::= SEQUENCE { distributionPoint [0] DistributionPointName OPTIONAL, onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE, onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE, onlySomeReasons [3] ReasonFlags OPTIONAL, indirectCRL [4] BOOLEAN DEFAULT FALSE } DistributionPointName ::= CHOICE { fullName [0] GeneralNames, nameRelativeToCRLIssuer [1] RelativeDistinguishedName } ReasonFlags ::= BIT STRING { unused (0), keyCompromise (1), cACompromise (2), affiliationChanged (3), superseded (4), cessationOfOperation (5), certificateHold (6) } GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName GeneralName ::= CHOICE { otherName [0] OtherName, rfc822Name [1] IA5String, dNSName [2] IA5String, x400Address [3] ORAddress, directoryName [4] Name, ediPartyName [5] EDIPartyName, uniformResourceIdentifier [6] IA5String, iPAddress [7] OCTET STRING, registeredID [8] OBJECT IDENTIFIER} OtherName ::= SEQUENCE { type-id OBJECT IDENTIFIER, value [0] EXPLICIT ANY DEFINED BY type-id } EDIPartyName ::= SEQUENCE { nameAssigner [0] DirectoryString OPTIONAL, partyName [1] DirectoryString } RelativeDistinguishedName ::= SET OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY DEFINED BY AttributeType
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]
static final String
private IssuingDistributionPoint
static final String
Attribute names.static final String
The Object Identifier for this extension.private static final long
Fields inherited from class org.mozilla.jss.netscape.security.x509.Extension
critical, extensionId, extensionValue
-
Constructor Summary
ConstructorsConstructorDescriptionIssuingDistributionPointExtension
(Boolean critical, Object value) This constructor is very important, since it will be called by the system.Creates a new IssuingDistributionPoint extension, with the given issuing distribution point as the first element. -
Method Summary
Modifier and TypeMethodDescriptionvoid
decode
(InputStream in) Decodes the attribute in the input stream.void
Deletes an attribute value from this CertAttrSet.void
encode
(OutputStream ostream) DER-encodes this extension to the given OutputStream.void
encode
(DerOutputStream out) Encodes this extension to the given DerOutputStream.void
Should be called if any change is made to this data structure so that the cached DER encoding can be discarded.Gets an attribute value for this CertAttrSet.Returns an enumeration of the names of the attributes existing within this attribute.boolean
getCritical
(boolean critical) Gets the criticality of this extension.Returns the issuing distribution point.getName()
Returns the name (identifier) of this CertAttrSet.static void
Test driver.void
Sets an attribute value within this CertAttrSet.void
setCritical
(boolean critical) Sets the criticality of this extension.toString()
Returns a printable representation of the IssuingDistributionPointExtensionMethods inherited from class org.mozilla.jss.netscape.security.x509.Extension
clearValue, getExtensionId, getExtensionValue, isCritical, setExtensionId, setExtensionValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
OID
The Object Identifier for this extension.- See Also:
-
NAME
Attribute names.- See Also:
-
ISSUING_DISTRIBUTION_POINT
- See Also:
-
issuingDistributionPoint
-
cachedEncoding
private byte[] cachedEncoding
-
-
Constructor Details
-
IssuingDistributionPointExtension
This constructor is very important, since it will be called by the system.- Throws:
IOException
-
IssuingDistributionPointExtension
Creates a new IssuingDistributionPoint extension, with the given issuing distribution point as the first element.
-
-
Method Details
-
getIssuingDistributionPoint
Returns the issuing distribution point. -
setCritical
public void setCritical(boolean critical) Sets the criticality of this extension. PKIX dictates that this extension SHOULD be critical, so applications can make it not critical if they have a very good reason. By default, the extension is critical.- Overrides:
setCritical
in classExtension
-
getCritical
public boolean getCritical(boolean critical) Gets the criticality of this extension. PKIX dictates that this extension SHOULD be critical, so by default, the extension is critical. -
encode
Encodes this extension to the given DerOutputStream. This method re-encodes each time it is called, so it is not very efficient.- Overrides:
encode
in classExtension
- Parameters:
out
- the DerOutputStream to write the extension to.- Throws:
IOException
- on encoding errors
-
flushCachedEncoding
public void flushCachedEncoding()Should be called if any change is made to this data structure so that the cached DER encoding can be discarded. -
toString
Returns a printable representation of the IssuingDistributionPointExtension- Specified by:
toString
in interfaceCertAttrSet
- Overrides:
toString
in classExtension
- Returns:
- value of this certificate attribute in printable form.
-
encode
DER-encodes this extension to the given OutputStream.- Specified by:
encode
in interfaceCertAttrSet
- Parameters:
ostream
- the OutputStream to encode the attribute to.- Throws:
CertificateException
- on encoding or validity errors.IOException
- on other errors.
-
decode
Description copied from interface:CertAttrSet
Decodes the attribute in the input stream.- Specified by:
decode
in interfaceCertAttrSet
- Parameters:
in
- the InputStream to read the encoded attribute from.- Throws:
CertificateException
- on decoding or validity errors.IOException
- on other errors.
-
set
Description copied from interface:CertAttrSet
Sets an attribute value within this CertAttrSet.- Specified by:
set
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute (e.g. "x509.info.key")obj
- the attribute object.- Throws:
CertificateException
- on attribute handling errors.IOException
- on other errors.
-
get
Description copied from interface:CertAttrSet
Gets an attribute value for this CertAttrSet.- Specified by:
get
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to return.- Returns:
- attribute value
- Throws:
CertificateException
- on attribute handling errors.IOException
- on other errors.
-
delete
Description copied from interface:CertAttrSet
Deletes an attribute value from this CertAttrSet.- Specified by:
delete
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to delete.- Throws:
CertificateException
- on attribute handling errors.IOException
- on other errors.
-
getAttributeNames
Description copied from interface:CertAttrSet
Returns an enumeration of the names of the attributes existing within this attribute.- Specified by:
getAttributeNames
in interfaceCertAttrSet
- Returns:
- an enumeration of the attribute names.
-
getName
Description copied from interface:CertAttrSet
Returns the name (identifier) of this CertAttrSet.- Specified by:
getName
in interfaceCertAttrSet
- Returns:
- the name of this CertAttrSet.
-
main
Test driver.
-