# PolicyQualifierInfo

public class **PolicyQualifierInfo** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
An immutable policy qualifier represented by the ASN.1 PolicyQualifierInfo
structure.

The ASN.1 definition is as follows:

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


A certificate policies extension, if present in an X.509 version 3
certificate, contains a sequence of one or more policy information terms,
each of which consists of an object identifier (OID) and optional
qualifiers. In an end-entity certificate, these policy information terms
indicate the policy under which the certificate has been issued and the
purposes for which the certificate may be used. In a CA certificate, these
policy information terms limit the set of policies for certification paths
which include this certificate.


A `Set` of `PolicyQualifierInfo` objects are returned
by the `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PolicyNode.html#getPolicyQualifiers()`
method. This allows applications with specific policy requirements to
process and validate each policy qualifier. Applications that need to
process policy qualifiers should explicitly set the
`policyQualifiersRejected` flag to false (by calling the
`https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PKIXParameters.html#setPolicyQualifiersRejected(boolean)` method) before validating
a certification path.

Note that the PKIX certification path validation algorithm specifies
that any policy qualifier in a certificate policies extension that is
marked critical must be processed and validated. Otherwise the
certification path must be rejected. If the
`policyQualifiersRejected` flag is set to false, it is up to
the application to validate all policy qualifiers in this manner in order
to be PKIX compliant.

**Concurrent Access**

All `PolicyQualifierInfo` objects must be immutable and
thread-safe. That is, multiple threads may concurrently invoke the
methods defined in this class on a single `PolicyQualifierInfo`
object (or more than one) with no ill effects. Requiring
`PolicyQualifierInfo` objects to be immutable and thread-safe
allows them to be passed around to various pieces of code without
worrying about coordinating access.

### Public Constructor Summary

|---|---|
|   | [PolicyQualifierInfo](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PolicyQualifierInfo.html#PolicyQualifierInfo(byte[]))(byte\[\] encoded) Creates an instance of `PolicyQualifierInfo` from the encoded bytes. |

### Public Method Summary

|---|---|
| final byte\[\] | [getEncoded](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PolicyQualifierInfo.html#getEncoded())() Returns the ASN.1 DER encoded form of this `PolicyQualifierInfo`. |
| final byte\[\] | [getPolicyQualifier](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PolicyQualifierInfo.html#getPolicyQualifier())() Returns the ASN.1 DER encoded form of the `qualifier` field of this `PolicyQualifierInfo`. |
| final [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getPolicyQualifierId](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PolicyQualifierInfo.html#getPolicyQualifierId())() Returns the `policyQualifierId` field of this `PolicyQualifierInfo`. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PolicyQualifierInfo.html#toString())() Return a printable representation of this `PolicyQualifierInfo`. |

### Inherited Method Summary

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Public Constructors

#### public
**PolicyQualifierInfo**
(byte\[\] encoded)

Creates an instance of `PolicyQualifierInfo` from the
encoded bytes. The encoded byte array is copied on construction.

##### Parameters

| encoded | a byte array containing the qualifier in DER encoding |
|---|---|

##### Throws

| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | thrown if the byte array does not represent a valid and parsable policy qualifier |
|---|---|

## Public Methods

#### public final byte\[\]
**getEncoded**
()

Returns the ASN.1 DER encoded form of this
`PolicyQualifierInfo`.

##### Returns

- the ASN.1 DER encoded bytes (never `null`). Note that a copy is returned, so the data is cloned each time this method is called.

#### public final byte\[\]
**getPolicyQualifier**
()

Returns the ASN.1 DER encoded form of the `qualifier`
field of this `PolicyQualifierInfo`.

##### Returns

- the ASN.1 DER encoded bytes of the `qualifier` field. Note that a copy is returned, so the data is cloned each time this method is called.

#### public final [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**getPolicyQualifierId**
()

Returns the `policyQualifierId` field of this
`PolicyQualifierInfo`. The `policyQualifierId`
is an Object Identifier (OID) represented by a set of nonnegative
integers separated by periods.

##### Returns

- the OID (never `null`)

#### public [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**toString**
()

Return a printable representation of this
`PolicyQualifierInfo`.

##### Returns

- a `String` describing the contents of this `PolicyQualifierInfo`