|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--iaik.asn1.structures.DistributionPoint
This class implements the ASN.1 type DistributionPoint as used
within a CRLDistributionPoints X.509v3 extension for identifying
how CRL information is obtained.
The X.509 Certificate and CRL profile presented in RFC 2459 specifies a DistributionPoint
as ASN.1 SEQUENCE structure specifying a distribution point name which may be an
URI pointing to the current CRL for the associated reasons, issued by the associated
cRLIssuer:
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),
privilegeWithdrawn (7),
aACompromise (8) }
If the distributionPoint omits reasons, the CRL shall include revocations for all reasons. If the distributionPoint omits cRLIssuer, the CRL shall be issued by the CA that issued the certificate.
More information can be found in the X.509 Certificate and CRL profile presented in RFC 2459, section 4.2.1.14 "CRLDistributionPoints".
When creating a DistributionPoint object to be used for the CRLDistributionPoints extension, you
may supply the distributionPointName immediately, and subsequently perhaps use the
setReasonFlags and/or
setCrlIssuer methods for setting the reasons
and/or cRLIssuer, e.g.:
e.g.:
GeneralName dpName = new GeneralName(GeneralName.uniformResourceIdentifier, "http://www.test-ca.at/repository"); DistributionPoint dp = new DistributionPoint(new GeneralNames(dpName)); dp.setReasonFlags(DistributionPoint.keyCompromise);
CRLDistributionPoints,
GeneralNames,
GeneralName,
Name| Field Summary | |
static int |
aACompromise
The aACompromise reason flag. |
static int |
affiliationChanged
The affiliationChanged reason flag. |
static int |
cACompromise
The cACompromise reason flag. |
static int |
certificateHold
The certificateHold reason flag. |
static int |
cessationOfOperation
The cessationOfOperation reason flag. |
static int |
keyCompromise
The keyCompromise reason flag. |
static int |
privilegeWithdrawn
The privilegeWithdrawn reason flag. |
static int |
superseded
The superseded reason flag. |
static int |
unused
The unused reason flag. |
| Constructor Summary | |
DistributionPoint()
Default constructor. |
|
DistributionPoint(ASN1Object distributionPoint)
Constructs a DistributionPoint from an ASN1Object. |
|
DistributionPoint(ASN1Type distributionPointName)
Creates a new DistributionPoint for the given distribution point name, specified as RDN or a GeneralNames.
|
|
| Method Summary | |
GeneralNames |
getCrlIssuer()
Returns the CRL Issuer parameter of this distribution point. |
ASN1Type |
getDistributionPointName()
Returns the distribution point name of this distribution point. |
int |
getReasonFlags()
Returns the reason flags specification of this distribution point. |
void |
setCrlIssuer(GeneralNames crlIssuer)
Sets the CRL Issuer parameter of this extension. |
void |
setDistributionPointName(ASN1Type distributionPointName)
Sets the distribution point name parameter of this extension. |
void |
setReasonFlags(int reasonFlags)
Sets the reason flags parameter of this extension. |
ASN1Object |
toASN1Object()
Returns this DistributionPoint as (SEQUENCE) ASN1Object. |
String |
toString()
Returns a string that represents the contents of this DistributionPoint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int unused
unused reason flag.public static final int keyCompromise
keyCompromise reason flag.public static final int cACompromise
cACompromise reason flag.public static final int affiliationChanged
affiliationChanged reason flag.public static final int superseded
superseded reason flag.public static final int cessationOfOperation
cessationOfOperation reason flag.public static final int certificateHold
certificateHold reason flag.public static final int privilegeWithdrawn
privilegeWithdrawn reason flag.public static final int aACompromise
aACompromise reason flag.| Constructor Detail |
public DistributionPoint()
DistributionPoint object.
By default, reasonFlag is set to -1 indicating that no
reason is selected, DistributionPointName and CrlIssuer
are set to null. Use setReasonFlags,
setDistributionPointName,
setCrlIssuer for setting the corresponding
values.
public DistributionPoint(ASN1Type distributionPointName)
throws IllegalArgumentException
RDN or a GeneralNames.
The supplied distribution point name has to be a RDN or a GeneralNames object:
For instance:
RDN distributionPointName = new RDN(); distributionPointName.addAVA(ObjectID.country, "AT"); distributionPointName.addAVA(ObjectID.locality, "Graz"); distributionPointName.addAVA(ObjectID.organization ,"TU Graz"); distributionPointName.addAVA(ObjectID.organizationalUnit ,"IAIK"); distributionPointName.addAVA(ObjectID.commonName ,"http://ca.iaik.com/"); DistributionPoint distributionPoint = new DistributionPoint(distributionPointName);
By default, reasonFlag is set to -1 indicating that no
reason is selected.
distributionPointName - the name of the distribution point as RDN or GeneralNames objectIllegalArgumentException - if the given name is not an instance of RDN
or GeneralNamesGeneralName,
RDN
public DistributionPoint(ASN1Object distributionPoint)
throws CodingException
The given distribution point ASN1Object is parsed for any distribution point name, reasons specification and CRLIssuer.
distributionPoint - the DistributionPoint as ASN1ObjectCodingException - if the ASN1Object is not a DistributionPoint| Method Detail |
public ASN1Object toASN1Object()
throws CodingException
CodingException - if there was an error while constructing the ASN1Object
public void setDistributionPointName(ASN1Type distributionPointName)
throws IllegalArgumentException
Only instances of RDN or GeneralNames are accepted!
For instance:
RDN distributionPointName = new RDN(); distributionPointName.addAVA(ObjectID.country, "AT"); distributionPointName.addAVA(ObjectID.locality, "Graz"); distributionPointName.addAVA(ObjectID.organization ,"UT Graz"); distributionPointName.addAVA(ObjectID.organizationalUnit ,"IAIK"); distributionPointName.addAVA(ObjectID.commonName ,"http://ca.iaik.com/"); DistributionPoint distributionPoint = new DistributionPoint(); distributionPoint.setDistributionPointName(distributionPointName);
distributionPointName - the name to be setIllegalArgumentException - if the given name is not an instance of RDN
or GeneralNamesGeneralNames,
RDNpublic void setReasonFlags(int reasonFlags)
For instance:
distributionPoint.setReasonFlags(DistributionPoint.keyCompromise);A value of -1 indicates that no reason is specified.
reasons - the reasons value as intpublic void setCrlIssuer(GeneralNames crlIssuer)
For instance:
GeneralNames generalNames = new GeneralNames(); generalNames.addName(new GeneralName(GeneralName.uniformResourceIdentifier, "http://ca.iaik.com/"));
crlIssuer - the CRL Issuer value to be set as GeneralNamespublic ASN1Type getDistributionPointName()
GeneralNames or as RDNGeneralNames,
RDN,
setDistributionPointName(iaik.asn1.ASN1Type)public int getReasonFlags()
Note the "big endian" representation of the BIT STRING representing the
reason flag value of this DistributionPoint: the least significant
bit indicates the reason flag with the lowest bit value, meaning that the integer
value 1 specifies the "unused" flag, and the integer value 64 (binary 1000000,
hexadecimal 40) specifies the "certificateHold" purpose.
int, or
-1 indicating that no reason is specifiedsetReasonFlags(int)public GeneralNames getCrlIssuer()
GeneralNames objectGeneralNames,
setCrlIssuer(iaik.asn1.structures.GeneralNames)public String toString()
toString in class Object
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK