FileDocCategorySizeDatePackage
CRLDistributionPoints.javaAPI DocAndroid 1.5 API4839Wed May 06 22:41:06 BST 2009org.apache.harmony.security.x509

CRLDistributionPoints

public class CRLDistributionPoints extends ExtensionValue
The class encapsulates the ASN.1 DER encoding/decoding work with the CRL Distribution Points which is the part of X.509 Certificate (as specified in RFC 3280 - Internet X.509 Public Key Infrastructure. Certificate and Certificate Revocation List (CRL) Profile. http://www.ietf.org/rfc/rfc3280.txt):
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),
privilegeWithdrawn (7),
aACompromise (8)
}

Fields Summary
private List
distributionPoints
private byte[]
encoding
public static final org.apache.harmony.security.asn1.ASN1Type
ASN1
Custom X.509 decoder.
Constructors Summary
public CRLDistributionPoints(List distributionPoints)

        if ((distributionPoints == null) 
                || (distributionPoints.size() == 0)) {
            throw new IllegalArgumentException(Messages.getString("security.17D")); //$NON-NLS-1$
        }
        this.distributionPoints = distributionPoints;
    
public CRLDistributionPoints(List distributionPoints, byte[] encoding)

        if ((distributionPoints == null) 
                || (distributionPoints.size() == 0)) {
            throw new IllegalArgumentException(Messages.getString("security.17D")); //$NON-NLS-1$
        }
        this.distributionPoints = distributionPoints;
        this.encoding = encoding;
    
Methods Summary
public static org.apache.harmony.security.x509.CRLDistributionPointsdecode(byte[] encoding)

        CRLDistributionPoints cdp = (CRLDistributionPoints) ASN1.decode(encoding);
        return cdp;
    
public voiddumpValue(java.lang.StringBuffer buffer, java.lang.String prefix)
Places the string representation of extension value into the StringBuffer object.

        buffer.append(prefix).append("CRL Distribution Points: [\n"); //$NON-NLS-1$
        int number = 0;
        for (Iterator it=distributionPoints.iterator();
                it.hasNext();) {
            buffer.append(prefix).append("  [").append(++number).append("]\n"); //$NON-NLS-1$ //$NON-NLS-2$
            ((DistributionPoint) it.next()).dumpValue(buffer, prefix + "  "); //$NON-NLS-1$
        }
        buffer.append(prefix).append("]\n"); //$NON-NLS-1$
    
public byte[]getEncoded()

        if (encoding == null) {
            encoding = ASN1.encode(this);
        }
        return encoding;