|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.PolicyQualifiers
This class contains the policy qualifier values for
the CertificatePolicies
extension.
policyQualifiers ::= SEQUENCE SIZE (1..MAX) OF PolicyQualifierInfo PolicyQualifierInfo ::= SEQUENCE { policyQualifierId PolicyQualifierId, qualifier ANY DEFINED BY policyQualifierId } PolicyQualifierId ::= OBJECT IDENTIFIER |
See Also
Constructor Summary |
|
PolicyQualifiers()
Constructs an empty |
|
PolicyQualifiers(byte[] valueBER,
int offset,
int special)
Constructs a |
Method Summary |
|
void |
addPolicyQualifier(byte[] id,
int idOffset,
int idLen,
byte[] data,
int dataOffset,
int dataLen)
Adds the |
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns true if this object and obj contains the same
|
int |
getDEREncoding(byte[] encoding,
int offset,
int special)
Places the DER encoding of the
|
int |
getDERLen(int special)
Returns the number of bytes that will be used by the DER encoding of
this |
static int |
getNextBEROffset(byte[] valueBER,
int offset)
Gets the next offset after the name:
Given nameBER, the BER encoding of a
|
byte[] |
getPolicyQualifierId(int Index)
Gets the OID value of the |
byte[] |
getQualifier(int Index)
Gets the data value of the |
int |
getQualifiersCount()
Gets the number of policy qualifier elements in this object. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PolicyQualifiers()
PolicyQualifiers
object.public PolicyQualifiers(byte[] valueBER, int offset, int special) throws CertificateException
PolicyQualifiers
object and
initializes it with the given values.Parameters
valueBER | A | ||
offset | The offset into the valueBER array. | ||
special | The special circumstances of the BER encoding,
if there are any.
The following ASN.1 constants are
possible values for special:
|
Throws
CertificateException
- If this method cannot
decode PolicyQualifiers
.Method Detail |
public void addPolicyQualifier(byte[] id, int idOffset, int idLen, byte[] data, int dataOffset, int dataLen) throws CertificateException
PolicyQualifiers
values.
Parameters
id | The policy qualifier ID. | ||
idOffset | The offset into the id array. | ||
idLen | The length of the id array. | ||
data | The qualifier value that can be any valid BER encoding. | ||
dataOffset | The offset into the data array. | ||
dataLen | The length of the data array. |
Throws
CertificateException
- If data or id are null
.public byte[] getPolicyQualifierId(int Index) throws CertificateException
PolicyQualifier
object
specified by index.Parameters
index | The index to the list of
|
Returns
Throws
CertificateException
- If the specified index
is invalid.public byte[] getQualifier(int Index) throws CertificateException
PolicyQualifier
object
specified by index.Parameters
index | The index to the list of
|
Returns
Throws
CertificateException
- If the specified index
is invalid.public int getQualifiersCount()
Returns
public static int getNextBEROffset(byte[] valueBER, int offset) throws CertificateException
PolicyQualifiers
object, beginning at
offset, finds the index to the next element
in the encoding.
For example, if the offset is 120 and the length of the
BER encoding of the PolicyQualifiers
object is 1819
bytes, this method returns 1939, the index
immediately following the PolicyQualifiers
object. nameBER[120]
is the first
byte in the encoding of the PolicyQualifiers
object, nameBER[1938]
is the last byte in the
encoding of the PolicyQualifiers
object, and the
next element begins at index 1939.Parameters
nameBER | The BER encoding of a | ||
offset | The offset into nameBER where the encoding begins. |
Returns
Throws
CertificateException
- If the method cannot read the BER encoding.public int getDERLen(int special) throws CertificateException
PolicyQualifiers
object. If this object is not set
with values, this method returns zero.Parameters
special | The special DER circumstances of the encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Returns
Throws
CertificateException
- If PolicyQualifiers
cannot be encoded.public int getDEREncoding(byte[] encoding, int offset, int special) throws CertificateException
PolicyQualifiers
object into
encoding, beginning at offset. To determine
the length of the encoding, call getDERLen
. If
this object is not yet set with values, then this method
places nothing into the array and returns zero. To indicate
that the DER encoding should follow any special
instructions, use the special argument.
For example, to indicate the following:
extension [1] IMPLICIT Extension |
special = (ASN1.CONTEXT_IMPLICIT | 1); |
special = 0 |
APP_IMPLICIT
, APP_EXPLICIT
,
PRIVATE_IMPLICIT
, PRIVATE_EXPLICIT
,
OPTIONAL
, DEFAULT
,
CONTEXT_IMPLICIT
,
or CONTEXT_EXPLICIT
.Parameters
encoding | The | ||
offset | The offset into encoding where
the DER encoding of the | ||
special | The special circumstances of the DER encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Returns
Throws
CertificateException
- If the method cannot create the DER encoding.public boolean equals(Object obj)
PolicyQualifiers
, returns false otherwise.Overrides
equals
in class Object
Parameters
obj | An instance of |
Returns
boolean
that indicates whether
these objects are equal.public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
PolicyQualifiers
object,
a copy of this object.
Throws
CloneNotSupportedException
- If the cloning operation
is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |