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

CertificatePolicies

public class CertificatePolicies extends ExtensionValue
The class encapsulates the ASN.1 DER encoding/decoding work with Certificate Policies structure which is a 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):
certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation

Fields Summary
private List
policyInformations
private byte[]
encoding
public static final org.apache.harmony.security.asn1.ASN1Type
ASN1
ASN.1 DER X.509 CertificatePolicies encoder/decoder class.
Constructors Summary
public CertificatePolicies()
Constructs an object representing the value of CertificatePolicies.

public CertificatePolicies(List policyInformations)
TODO

param
policyInformations: List

        this.policyInformations = policyInformations;
    
private CertificatePolicies(List policyInformations, byte[] encoding)

        this.policyInformations = policyInformations;
        this.encoding = encoding;
    
Methods Summary
public org.apache.harmony.security.x509.CertificatePoliciesaddPolicyInformation(PolicyInformation policyInformation)
TODO

param
policyInformation: PolicyInformation
return

        encoding = null;
        if (policyInformations == null) {
            policyInformations = new ArrayList();
        }
        policyInformations.add(policyInformation);
        return this;
    
public static org.apache.harmony.security.x509.CertificatePoliciesdecode(byte[] encoding)

        CertificatePolicies cps = ((CertificatePolicies) ASN1.decode(encoding));
        cps.encoding = encoding;
        return cps;
    
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("CertificatePolicies [\n"); //$NON-NLS-1$
        for (Iterator it=policyInformations.iterator(); it.hasNext();) {
            buffer.append(prefix);
            buffer.append("  "); //$NON-NLS-1$
            ((PolicyInformation) it.next()).dumpValue(buffer);
            buffer.append('\n");
        }
        buffer.append(prefix).append("]\n"); //$NON-NLS-1$
    
public byte[]getEncoded()
Returns ASN.1 encoded form of this X.509 CertificatePolicies value.

return
a byte array containing ASN.1 encode form.

        if (encoding == null) {
            encoding = ASN1.encode(this);
        }
        return encoding;
    
public java.util.ListgetPolicyInformations()
Returns the values of policyInformation field of the structure.

return
policyInformations

        return new ArrayList(policyInformations);