public class CRLDistributionPointsExtension extends Extension implements CertAttrSet
cRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint DistributionPoint ::= SEQUENCE { distributionPoint [0] DistributionPointName OPTIONAL, reasons [1] ReasonFlags OPTIONAL, cRLIssuer [2] GeneralNames OPTIONAL } 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) }
Modifier and Type | Class and Description |
---|---|
static class |
CRLDistributionPointsExtension.Reason
Represents a reason that a cert may be revoked.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static java.lang.String |
OID
The Object Identifier for this extension.
|
critical, extensionId, extensionValue
Constructor and Description |
---|
CRLDistributionPointsExtension(java.lang.Boolean critical,
java.lang.Object value)
This constructor is called by the CertificateExtensions class to decode
an extension whose OID indicates it is a CRLDistributionsPoints
extension.
|
CRLDistributionPointsExtension(CRLDistributionPoint dp)
Creates a new CRLDistributionPoints extension, with the given
distribution point as the first element.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(CRLDistributionPoint dp)
Adds an additional distribution point to the end of the sequence.
|
void |
decode(java.io.InputStream in)
Decodes the attribute in the input stream.
|
void |
delete(java.lang.String name)
Deletes an attribute value from this CertAttrSet.
|
void |
encode(DerOutputStream out)
Encodes this extension to the given DerOutputStream.
|
void |
encode(java.io.OutputStream ostream)
DER-encodes this extension to the given OutputStream.
|
void |
flushCachedEncoding()
Should be called if any change is made to this data structure
so that the cached DER encoding can be discarded.
|
java.lang.Object |
get(java.lang.String name)
Gets an attribute value for this CertAttrSet.
|
java.util.Enumeration<java.lang.String> |
getAttributeNames()
Returns an enumeration of the names of the attributes existing within
this attribute.
|
java.lang.String |
getName()
Returns the name (identifier) of this CertAttrSet.
|
int |
getNumPoints()
Returns the number of distribution points in the sequence.
|
CRLDistributionPoint |
getPointAt(int index)
Returns the DistributionPoint at the given index in the sequence.
|
static void |
main(java.lang.String[] args)
Test driver.
|
void |
set(java.lang.String name,
java.lang.Object obj)
Sets an attribute value within this CertAttrSet.
|
void |
setCritical(boolean critical)
Sets the criticality of this extension.
|
java.lang.String |
toString()
Returns the Extension in user readable form.
|
clearValue, getExtensionId, getExtensionValue, isCritical, setExtensionId, setExtensionValue
public static final java.lang.String OID
public static final java.lang.String NAME
public CRLDistributionPointsExtension(java.lang.Boolean critical, java.lang.Object value)
public CRLDistributionPointsExtension(CRLDistributionPoint dp)
public void addPoint(CRLDistributionPoint dp)
public int getNumPoints()
public CRLDistributionPoint getPointAt(int index)
public void setCritical(boolean critical)
setCritical
in class Extension
public void encode(DerOutputStream out) throws java.io.IOException
public void flushCachedEncoding()
public java.lang.String toString()
Extension
toString
in interface CertAttrSet
toString
in class Extension
public void encode(java.io.OutputStream ostream) throws java.security.cert.CertificateException, java.io.IOException
encode
in interface CertAttrSet
ostream
- the OutputStream to encode the attribute to.java.security.cert.CertificateException
- on encoding or validity errors.java.io.IOException
- on other errors.public void decode(java.io.InputStream in) throws java.security.cert.CertificateException, java.io.IOException
CertAttrSet
decode
in interface CertAttrSet
in
- the InputStream to read the encoded attribute from.java.security.cert.CertificateException
- on decoding or validity errors.java.io.IOException
- on other errors.public void set(java.lang.String name, java.lang.Object obj) throws java.security.cert.CertificateException, java.io.IOException
CertAttrSet
set
in interface CertAttrSet
name
- the name of the attribute (e.g. "x509.info.key")obj
- the attribute object.java.security.cert.CertificateException
- on attribute handling errors.java.io.IOException
- on other errors.public java.lang.Object get(java.lang.String name) throws java.security.cert.CertificateException, java.io.IOException
CertAttrSet
get
in interface CertAttrSet
name
- the name of the attribute to return.java.security.cert.CertificateException
- on attribute handling errors.java.io.IOException
- on other errors.public void delete(java.lang.String name) throws java.security.cert.CertificateException, java.io.IOException
CertAttrSet
delete
in interface CertAttrSet
name
- the name of the attribute to delete.java.security.cert.CertificateException
- on attribute handling errors.java.io.IOException
- on other errors.public java.util.Enumeration<java.lang.String> getAttributeNames()
CertAttrSet
getAttributeNames
in interface CertAttrSet
public java.lang.String getName()
CertAttrSet
getName
in interface CertAttrSet
public static void main(java.lang.String[] args)