APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.x509

public Class DistributionPoint

extends Object
implements DerEncoder
Class Inheritance
All Implemented Interfaces
sun.security.util.DerEncoder
Imports
java.io.IOException, java.util.*, sun.security.util.BitArray, .DerEncoder, .DerOutputStream, .DerValue

Represent the DistributionPoint sequence used in the CRL Distribution Points Extension (OID = 2.5.29.31).

The ASN.1 definition for this is:

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) }

GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName

GeneralName ::= CHOICE {
        otherName                   [0] INSTANCE OF OTHER-NAME,
        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 }

RelativeDistinguishedName ::=
  SET OF AttributeTypeAndValue

AttributeTypeAndValue ::= SEQUENCE {
  type     AttributeType,
  value    AttributeValue }

AttributeType ::= OBJECT IDENTIFIER

AttributeValue ::= ANY DEFINED BY AttributeType

Instances of this class are designed to be immutable. However, since this is an internal API we do not use defensive cloning for values for performance reasons. It is the responsibility of the consumer to ensure that no mutable elements are modified.

Authors
Anne Anderson, Andreas Sterbenz
Since
1.4.2
See Also
CRLDistributionPointsExtension

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
private GeneralNames
private GeneralNames
private volatile int
public static final int
public static final int
private static final String[]
private boolean[]
private RDN
public static final int
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte

Constructor Summary

AccessConstructor and Description
public
DistributionPoint(GeneralNames
the GeneralNames of the distribution point; may be null
fullName
,
boolean[]
the CRL reasons included in the CRL at this distribution point; may be null
reasonFlags
,
GeneralNames
the name(s) of the CRL issuer for the CRL at this distribution point; may be null
crlIssuer
)

Constructor for the class using GeneralNames for DistributionPointName

public
DistributionPoint(RDN
the RelativeDistinguishedName of the distribution point; may not be null
relativeName
,
boolean[]
the CRL reasons included in the CRL at this distribution point; may be null
reasonFlags
,
GeneralNames
the name(s) of the CRL issuer for the CRL at this distribution point; may not be null or empty.
crlIssuer
)

Constructor for the class using RelativeDistinguishedName for DistributionPointName

public
DistributionPoint(DerValue
the DER encoded form of the DistributionPoint
val
)

Create the object from the passed DER encoded form.

Method Summary

Modifier and TypeMethod and Description
public void
encode(DerOutputStream
the DerOutputStream to write the extension to.
out
)

Implements sun.security.util.DerEncoder.encode.

Write the DistributionPoint value to the DerOutputStream.

public boolean

Returns:

true if objects match; false otherwise
equals
(Object
Object to be compared to this
obj
)

Overrides java.lang.Object.equals.

Compare an object to this DistributionPoint for equality.

public GeneralNames
getCRLIssuer()

Return the CRL issuer name or null if not set.

public GeneralNames
getFullName()

Return the full distribution point name or null if not set.

public boolean[]
getReasonFlags()

Return the reason flags or null if not set.

public RDN
getRelativeName()

Return the relative distribution point name or null if not set.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private static String
reasonToString(int reason)

Return a string representation for reasonFlag bit 'reason'.

public String
toString()

Overrides java.lang.Object.toString.

Return a printable string of the Distribution Point.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

AA_COMPROMISEback to summary
public static final int AA_COMPROMISE
AFFILIATION_CHANGEDback to summary
public static final int AFFILIATION_CHANGED
CA_COMPROMISEback to summary
public static final int CA_COMPROMISE
CERTIFICATE_HOLDback to summary
public static final int CERTIFICATE_HOLD
CESSATION_OF_OPERATIONback to summary
public static final int CESSATION_OF_OPERATION
crlIssuerback to summary
private GeneralNames crlIssuer
fullNameback to summary
private GeneralNames fullName
hashCodeback to summary
private volatile int hashCode
KEY_COMPROMISEback to summary
public static final int KEY_COMPROMISE
PRIVILEGE_WITHDRAWNback to summary
public static final int PRIVILEGE_WITHDRAWN
REASON_STRINGSback to summary
private static final String[] REASON_STRINGS
reasonFlagsback to summary
private boolean[] reasonFlags
relativeNameback to summary
private RDN relativeName
SUPERSEDEDback to summary
public static final int SUPERSEDED
TAG_DIST_PTback to summary
private static final byte TAG_DIST_PT
TAG_FULL_NAMEback to summary
private static final byte TAG_FULL_NAME
TAG_ISSUERback to summary
private static final byte TAG_ISSUER
TAG_REASONSback to summary
private static final byte TAG_REASONS
TAG_REL_NAMEback to summary
private static final byte TAG_REL_NAME

Constructor Detail

DistributionPointback to summary
public DistributionPoint(GeneralNames fullName, boolean[] reasonFlags, GeneralNames crlIssuer)

Constructor for the class using GeneralNames for DistributionPointName

Parameters
fullName:GeneralNames

the GeneralNames of the distribution point; may be null

reasonFlags:boolean[]

the CRL reasons included in the CRL at this distribution point; may be null

crlIssuer:GeneralNames

the name(s) of the CRL issuer for the CRL at this distribution point; may be null

DistributionPointback to summary
public DistributionPoint(RDN relativeName, boolean[] reasonFlags, GeneralNames crlIssuer)

Constructor for the class using RelativeDistinguishedName for DistributionPointName

Parameters
relativeName:RDN

the RelativeDistinguishedName of the distribution point; may not be null

reasonFlags:boolean[]

the CRL reasons included in the CRL at this distribution point; may be null

crlIssuer:GeneralNames

the name(s) of the CRL issuer for the CRL at this distribution point; may not be null or empty.

DistributionPointback to summary
public DistributionPoint(DerValue val) throws IOException

Create the object from the passed DER encoded form.

Parameters
val:DerValue

the DER encoded form of the DistributionPoint

Exceptions
IOException:
on error

Method Detail

encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Write the DistributionPoint value to the DerOutputStream.

Parameters
out:DerOutputStream

the DerOutputStream to write the extension to.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Compare an object to this DistributionPoint for equality.

Parameters
obj:Object

Object to be compared to this

Returns:boolean

true if objects match; false otherwise

Annotations
@Override
getCRLIssuerback to summary
public GeneralNames getCRLIssuer()

Return the CRL issuer name or null if not set.

getFullNameback to summary
public GeneralNames getFullName()

Return the full distribution point name or null if not set.

getReasonFlagsback to summary
public boolean[] getReasonFlags()

Return the reason flags or null if not set.

getRelativeNameback to summary
public RDN getRelativeName()

Return the relative distribution point name or null if not set.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
reasonToStringback to summary
private static String reasonToString(int reason)

Return a string representation for reasonFlag bit 'reason'.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return a printable string of the Distribution Point.