iaik.asn1.structures
Class PolicyQualifierInfo

java.lang.Object
  |
  +--iaik.asn1.structures.PolicyQualifierInfo

public class PolicyQualifierInfo
extends java.lang.Object

This class implements the ASN.1 type PolicyQualifierInfo.

The PolicyQualifierInfo type is used for defining the information specified by the PolicyInformation terms of the X.509v3 Certificate Policies extension, indicating the policy under which the certificate has been issued and the purposes for which the certificate may be used.

 certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
 

PolicyInformation ::= SEQUENCE { policyIdentifier CertPolicyId, policyQualifiers SEQUENCE SIZE (1..MAX) OF PolicyQualifierInfo OPTIONAL }

CertPolicyId ::= OBJECT IDENTIFIER

PolicyQualifierInfo ::= SEQUENCE { policyQualifierId PolicyQualifierId, qualifier ANY DEFINED BY policyQualifierId }

The X.509 Certificate and CRL profile presented in the PKIX internet draft draft-ietf-pkix-ipki-part1-06.txt defines two policy qualifiers types:

 Qualifier ::= CHOICE { 
    cPSuri         CPSuri,     -- CPS Pointer qualifier
    userNotice     UserNotice  -- User Notice qualifier
 }
 

The CPS Pointer qualifier indicates a (URI) pointer to a Certification Practice Statement (CPS) published by the CA:

CPSuri ::= IA5String

The User Notice qualifier may include a noticeRef field identifying an organization and a particular textual statement prepared by that organization, or/and an explicitText string field of up to 200 characters including the textual statement directly into the certificate:

 UserNotice ::= SEQUENCE {     
   noticeRef     NoticeReference OPTIONAL,
   explicitText  DisplayText OPTIONAL}  
 
NoticeReference ::= SEQUENCE { organization IA5String, noticeNumbers SEQUENCE OF INTEGER }
DisplayText ::= CHOICE { visibleString VisibleString, bmpString BMPString }

The policy qualifier IDs for the CPS Pointer and User Notice qualifiers are defined as follows:

 id-qt ::= { id-pkix 2 }  -- pkix arc for qualifier types
 
id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 } id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
PolicyQualifierId ::= OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )

More information can be found in the PKIX internet draft draft-ietf-pkix-ipki-part1-06.txt, section 4.2.1.5 "Certificate Policies".

When creating a PolicyQualifierInfo object to be set for a PolicyInformation, use a proper constructor for either specifying a CPS Pointer qualifier or a User Notice qualifier, e.g.:

 int[] notice_nr = {12, 35};
 ObjectID iaik_policy_id = new ObjectID("1.2.3.4.5", "iaik_policy_id");
 PolicyQualifierInfo policy_qualifier = new PolicyQualifierInfo("IAIK", notice_nr, null);
 

See Also:
PolicyInformation, CertificatePolicies

Constructor Summary
PolicyQualifierInfo(ASN1Object policyQualifierInfo)
          Constructs a PolicyQualifierInfo from an ASN1Object.
PolicyQualifierInfo(java.lang.String CpsUri)
          Creates a new PolicyQualifierInfo from a CPS Pointer qualifier.
PolicyQualifierInfo(java.lang.String organization, int[] noticeNumbers, java.lang.String explicitText)
          Creates a new PolicyQualifierInfo from a user notice qualifier specified by reference information and/or an explicit text.
 
Method Summary
 ASN1Object toASN1Object()
          Returns this PolicyQualifierInfo as ASN1Object.
 java.lang.String toString()
          Returns a string that represents the contents of PolicyQualifierInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PolicyQualifierInfo

public PolicyQualifierInfo(java.lang.String CpsUri)
Creates a new PolicyQualifierInfo from a CPS Pointer qualifier. The CPS Pointer qualifier contains a pointer to a Certification Practice Statement (CPS) published by the CA. The pointer is in the form of an URI.
Parameters:
CpsUri - the pointer as URI

PolicyQualifierInfo

public PolicyQualifierInfo(java.lang.String organization,
                           int[] noticeNumbers,
                           java.lang.String explicitText)
Creates a new PolicyQualifierInfo from a user notice qualifier specified by reference information and/or an explicit text.

A user notice qualifier has two optional fields:

 UserNotice ::= SEQUENCE {     
   noticeRef     NoticeReference OPTIONAL,
   explicitText  DisplayText OPTIONAL}  
 

A notice reference consists of an organization name and a notice number identifying a particular textual statement prepared by this organization:

 NoticeReference ::= SEQUENCE {
 organization  IA5String,     
 noticeNumbers SEQUENCE OF INTEGER }
 

An explicitText field includes the textual statement directly in the certificate. The explicitText field is a string with a maximum size of 200 characters:

 DisplayText ::= CHOICE {     
   visibleString VisibleString,
   bmpString     BMPString }
 

Parameters:
organization - the organization [or null if not needed; sets noticeNumbers also to null]
noticeNumbers - notice numbers [or null if not needed; sets organization also to null]
explicitText - the textual statement or null if not needed

PolicyQualifierInfo

public PolicyQualifierInfo(ASN1Object policyQualifierInfo)
                    throws CodingException
Constructs a PolicyQualifierInfo from an ASN1Object.

The supplied ASN1Object represents an already existing PolicyQualifierInfo that may have been created by means of the toASN1Object() method.

Parameters:
policyQualifierInfo - the PolicyQualifierInfo as ASN1Object
Throws:
CodingException - if the ASN1Object is not a PolicyQualifierInfo
Method Detail

toASN1Object

public ASN1Object toASN1Object()
Returns this PolicyQualifierInfo as ASN1Object.
Returns:
this PolicyQualifierInfo as ASN1Object

toString

public java.lang.String toString()
Returns a string that represents the contents of PolicyQualifierInfo
Overrides:
toString in class java.lang.Object
Returns:
the string representation