|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.SemanticsInformation
This class is used in QC Statements extension in Qualified Certificates.
The ASN.1 definition is as follows:SemanticsInformation ::= SEQUENCE { semanticsIdentifier OBJECT IDENTIFIER OPTIONAL nameRegistrationAuthorities NameRegistrationAuthorities OPTIONAL } -- At least one field shall be present NameRegistrationAuthorities ::= SEQUENCE SIZE (1...MAX) OF GeneralName id-qcs-pkixQCSyntax-v1 OBJECT IDENTIFIER ::= { id-qcs 1 } |
See Also
Constructor Summary |
|
SemanticsInformation()
Constructs an empty |
|
SemanticsInformation(byte[] infoBER,
int offset,
int special)
Creates a |
Method Summary |
|
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns |
int |
getDEREncoding(byte[] encoding,
int offset,
int special)
Places the DER encoding of this
|
int |
getDERLen(int special)
Returns the number of bytes that will be used by the DER encoding of
this |
byte[] |
getID()
Gets a |
getName()
Gets a |
|
static int |
getNextBEROffset(byte[] valueBER,
int offset)
Given valueBER, the BER encoding of a
|
void |
setID(byte[] id,
int offset,
int len)
Sets a |
void |
setName(GeneralNames name)
Sets a |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SemanticsInformation(byte[] infoBER, int offset, int special) throws NameException
SemanticsInformation
object
and initializes it with the given values.Parameters
infoBER | A | ||
offset | The offset into the infoBER array. | ||
special | The special instructions of
the BER encoding, if there are any.
The following ASN.1 constants are
possible values for special:
|
Throws
NameException
- If the encoding is invalid.public SemanticsInformation()
SemanticsInformation
object.Method Detail |
public void setName(GeneralNames name)
nameRegistrationAuthorities
field to this
name
, containing a name of one or more name registration
authorities, responsible for registration of attributes or
names associated with the subject. If passed in
value in null, it sets the nameRegistrationAuthorities
component to null.
Parameters
name | name registration authorities |
public GeneralNames getName()
nameRegistrationAuthorities
value
Returns
public void setID(byte[] id, int offset, int len)
semanticsIdentifier
component to this id
containing an OID, which defines semantics for attributes and names
in basic certificate fields and certificate extensions. If passed in
value in null, it sets the semanticsIdentifier
component to null.
Parameters
id | Semantics Identifier | ||
offset | the offset into | ||
len | the length of the Semantics Identifier value in
|
public byte[] getID()
semanticsIdentifier
value.
Returns
public static int getNextBEROffset(byte[] valueBER, int offset) throws NameException
SemanticsInformation
object beginning at
offset, finds the index to the next element
in the encoding. In other words, this method
gets the next offset
after the SemanticsInformation
object.
For example, if the offset is 120 and the
SemanticsInformation
object's BER encoding is 1819
bytes, then this method will return 1939, the index
immediately following the SemanticsInformation
object. That is, valueBER[120]
is the first
byte in the encoding of the SemanticsInformation
object, valueBER[1938]
is the last byte in the
encoding of the SemanticsInformation
object, and
the next element begins at index 1939.Parameters
valueBER | The BER encoding of this
| ||
offset | The offset into valueBER where the encoding begins. |
Returns
Throws
NameException
- If the method cannot
read the BER encoding.public int getDERLen(int special) throws NameException
SemanticsInformation
object. If this object is not
set with values, then this method returns zero.Parameters
special | The special circumstances of the DER encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Returns
SemanticsInformation
object.Throws
NameException
- if there is an error in encodingpublic int getDEREncoding(byte[] encoding, int offset, int special) throws NameException
SemanticsInformation
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 Extensionpass in the following:
special = (ASN1.CONTEXT_IMPLICIT | 1);If there are no special circumstances, pass in the following:
special = 0The following ASN.1 constants are possible values for special:
APP_IMPLICIT
, APP_EXPLICIT
,
PRIVATE_IMPLICIT
, PRIVATE_EXPLICIT
,
OPTIONAL
, DEFAULT
,
CONTEXT_IMPLICIT
,
or CONTEXT_EXPLICIT
.Parameters
encoding | The | ||
offset | The offset into encoding where writing begins. | ||
special | The special circumstances of the DER encoding,
if there are any.
The following ASN.1 constants are
possible values for special:
|
Returns
Throws
NameException
- If the method cannot create
the DER encoding.public boolean equals(Object obj)
true
if this object
and obj contain the same
SemanticsInformation
; 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
SemanticsInformation
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 |