FileDocCategorySizeDatePackage
PolicyQualifierInfo.javaAPI DocAndroid 1.5 API3014Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.x509

PolicyQualifierInfo

public class PolicyQualifierInfo extends org.bouncycastle.asn1.ASN1Encodable
Policy qualifiers, used in the X509V3 CertificatePolicies extension.
PolicyQualifierInfo ::= SEQUENCE {
policyQualifierId PolicyQualifierId,
qualifier ANY DEFINED BY policyQualifierId }

Fields Summary
private org.bouncycastle.asn1.DERObjectIdentifier
policyQualifierId
private org.bouncycastle.asn1.DEREncodable
qualifier
Constructors Summary
public PolicyQualifierInfo(org.bouncycastle.asn1.DERObjectIdentifier policyQualifierId, org.bouncycastle.asn1.DEREncodable qualifier)
Creates a new PolicyQualifierInfo instance.

param
policyQualifierId a PolicyQualifierId value
param
qualifier the qualifier, defined by the above field.

      this.policyQualifierId = policyQualifierId;
      this.qualifier = qualifier;
   
public PolicyQualifierInfo(String cps)
Creates a new PolicyQualifierInfo containing a cPSuri qualifier.

param
cps the CPS (certification practice statement) uri as a String.

      policyQualifierId = PolicyQualifierId.id_qt_cps;
      qualifier = new DERIA5String (cps);
   
public PolicyQualifierInfo(org.bouncycastle.asn1.ASN1Sequence as)
Creates a new PolicyQualifierInfo instance.

param
as PolicyQualifierInfo X509 structure encoded as an ASN1Sequence.

        if (as.size() != 2)
        {
            throw new IllegalArgumentException("Bad sequence size: "
                    + as.size());
        }

        policyQualifierId = DERObjectIdentifier.getInstance(as.getObjectAt(0));
        qualifier = as.getObjectAt(1);
   
Methods Summary
public static org.bouncycastle.asn1.x509.PolicyQualifierInfogetInstance(java.lang.Object as)

        if (as instanceof PolicyQualifierInfo)
        {
            return (PolicyQualifierInfo)as;
        }
        else if (as instanceof ASN1Sequence)
        {
            return new PolicyQualifierInfo((ASN1Sequence)as);
        }

        throw new IllegalArgumentException("unknown object in getInstance.");
   
public org.bouncycastle.asn1.DERObjectIdentifiergetPolicyQualifierId()

       return policyQualifierId;
   
public org.bouncycastle.asn1.DEREncodablegetQualifier()

       return qualifier;
   
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Returns a DER-encodable representation of this instance.

return
a DERObject value

      ASN1EncodableVector dev = new ASN1EncodableVector();
      dev.add(policyQualifierId);
      dev.add(qualifier);

      return new DERSequence(dev);