|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.AttributeValueAssertion
This class contains the Attribute Value Assertion (AVA) components.
It can hold an AVA of a known type or an unknown type.
If the type is unknown, then
attributeType = UNKNOWN_ATTRIBUTE_TYPE
.
If valueType = UNSUPPORTED_ASN1_TYPE
,
then valueDER
holds the DER encoding of the value ATTRIBUTE_TYPE
.
Either valueDER or valueString has to be non-null.
Currently all the supported attribute types are a String
.
AttributeTypeAndValue ::= SEQUENCE type ATTRIBUTE.&id ({SupportedAttributes}), value ({ATTRIBUTE.&Type ({SupportedAttributes}{@type})} |
See Also
Field Summary |
|
static int |
BOUND_UNLIMITED
Indicates that the string size is unlimited. |
static int |
BUSINESS_CATEGORY
Indicates that it is the business category attribute. |
static byte[] |
BUSINESS_CATEGORY_OID
Contains the OID for the business category attribute. |
static int |
COMMON_NAME
Indicates that it is the common name attribute. |
static byte[] |
COMMON_NAME_OID
Contains the OID for the common name attribute. |
static int |
COUNTRY_NAME
Indicates that it is the country name attribute. |
static int |
COUNTRY_NAME_LENGTH
Contains the length of the country name string. |
static byte[] |
COUNTRY_NAME_OID
Contains the OID for the country name attribute. |
static int |
COUNTRY_OF_CITIZENSHIP
Indicates that it is the Country Of Citizenship attribute. |
static byte[] |
COUNTRY_OF_CITIZENSHIP_OID
Contains the OID for the Country Of Citizenship attribute. |
static int |
COUNTRY_OF_RESIDENCE
Indicates that it is the Country Of Residence attribute. |
static byte[] |
COUNTRY_OF_RESIDENCE_OID
Contains the OID for the Country Of Residence attribute. |
static int |
DATE_OF_BIRTH
Indicates that it is the Date Of Birth attribute. |
static byte[] |
DATE_OF_BIRTH_OID
Contains the OID for the Date Of Birth attribute. |
static int |
DN_QUALIFIER
Indicates that it is the dnQualifier attribute. |
static byte[] |
DN_QUALIFIER_OID
Contains the OID for the dnQualifier attribute. |
static int |
DOMAIN_COMPONENT
Indicates that it is the Domain Component attribute. |
static byte[] |
DOMAIN_COMPONENT_OID
Contains the OID for the Domain Component attribute. |
static int |
EMAIL_ADDRESS
Indicate that it is the e-mail address attribute. |
static byte[] |
EMAIL_ADDRESS_OID
Contains the OID for the e-mail address attribute. |
static int |
GENDER
Indicates that it is the Gender attribute. |
static byte[] |
GENDER_OID
Contains the OID for the Gender attribute. |
static int |
GENERATION_QUALIFIER
Indicates that it is the Generation Qualifier attribute. |
static byte[] |
GENERATION_QUALIFIER_OID
Contains the OID for the Generation Qualifier attribute. |
static int |
GIVEN_NAME
Indicates that it is the given name attribute. |
static byte[] |
GIVEN_NAME_OID
Contains the OID for the given name attribute. |
static int |
INITIALS
Indicates that it is the Initials attribute. |
static byte[] |
INITIALS_OID
Contains the OID for the Initials attribute. |
static int |
LOCALITY_NAME
Indicates that it is the locality name attribute. |
static byte[] |
LOCALITY_NAME_OID
Contains the OID for the locality name attribute. |
static int |
NAME
Indicates that it is the name attribute. |
static byte[] |
NAME_OID
Contains the OID for the name attribute. |
static int |
ORGANIZATION_NAME
Indicates that it is the organization name attribute. |
static byte[] |
ORGANIZATION_NAME_OID
Contains the OID for the organization name attribute. |
static int |
ORGANIZATIONAL_UNIT_NAME
Indicates that it is the organizational unit name attribute. |
static byte[] |
ORGANIZATIONAL_UNIT_NAME_OID
Contains the OID for the organizational unit name attribute. |
static int |
PLACE_OF_BIRTH
Indicates that it is the Place Of Birth attribute. |
static byte[] |
PLACE_OF_BIRTH_OID
Contains the OID for the Place Of Birth attribute. |
static int |
POSTAL_ADDRESS
Indicates that it is the Postal Address attribute. |
static byte[] |
POSTAL_ADDRESS_OID
Contains the OID for the Postal Address attribute. |
static int |
POSTAL_CODE
Indicates that it is the postal code attribute. |
static byte[] |
POSTAL_CODE_OID
Contains the OID for the postal code attribute. |
static int |
PSEUDONYM
Indicates that it is the Pseudonym attribute. |
static byte[] |
PSEUDONYM_OID
Contains the OID for the Pseudonym attribute. |
static int |
SERIAL_NUMBER
Indicates that it is the serial number attribute. |
static byte[] |
SERIAL_NUMBER_OID
Contains the OID for the serial number attribute. |
static int |
STATE_NAME
Indicates that it is the state or province name attribute. |
static byte[] |
STATE_NAME_OID
Contains the OID for the state or province name attribute. |
static int |
STREET_ADDRESS
Indicates that it is the street address attribute. |
static byte[] |
STREET_ADDRESS_OID
Contains the OID for the street address attribute. |
static int |
SURNAME
Indicates that it is the surname attribute. |
static byte[] |
SURNAME_OID
Contains the OID for the surname attribute. |
static int |
TELEPHONE_NUMBER
Indicates that it is the telephone number attribute. |
static byte[] |
TELEPHONE_NUMBER_OID
Contains the OID for the telephone number attribute. |
static int |
TITLE
Indicates that it is the title attribute. |
static byte[] |
TITLE_OID
Contains the OID for the title attribute. |
static int |
UB_BUSINESS_CATEGORY
Contains the upper boundary of the business category string. |
static int |
UB_COMMON_NAME
Contains the upper boundary of the common name string. |
static int |
UB_COUNTRY_OF_CITIZENSHIP
Contains the upper boundary of the Country Of Citizenship string. |
static int |
UB_COUNTRY_OF_RESIDENCE
Contains the upper boundary of the Country Of Residence string. |
static int |
UB_DATE_OF_BIRTH
Contains the upper boundary of the Date Of Birth string. |
static int |
UB_DN_QUALIFIER
Contains the upper boundary of the dnQualifier string. |
static int |
UB_DOMAIN_COMPONENT
Contains the upper boundary of the Domain Component string. |
static int |
UB_EMAIL_ADDRESS
Contains the upper boundary of the e-mail address string. |
static int |
UB_GENDER
Contains the upper boundary of the Gender string. |
static int |
UB_GENERATION_QUALIFIER
Contains the upper boundary of the Generation Qualifier string. |
static int |
UB_GIVEN_NAME
Contains the upper boundary of the given name string. |
static int |
UB_INITIALS
Contains the upper boundary of the Initials string. |
static int |
UB_LOCALITY_NAME
Contains the upper boundary of the locality name string. |
static int |
UB_NAME
Contains the upper boundary of the name string. |
static int |
UB_ORGANIZATION_NAME
Contains the upper boundary of the organization name string. |
static int |
UB_ORGANIZATIONAL_UNIT_NAME
Contains the upper boundary of the organizational unit name string. |
static int |
UB_PLACE_OF_BIRTH
Contains the upper boundary of the Place Of Birth string. |
static int |
UB_POSTAL_ADDRESS
Contains the upper boundary of the Postal Address string. |
static int |
UB_POSTAL_CODE
Contains the upper boundary of the postal code string. |
static int |
UB_PSEUDONYM
Contains the upper boundary of the Pseudonym string. |
static int |
UB_SERIAL_NUMBER
Contains the upper boundary of the serial number string. |
static int |
UB_STATE_NAME
Contains the upper boundary of the state or province name string. |
static int |
UB_STREET_ADDRESS
Contains the upper boundary of the street address string. |
static int |
UB_SURNAME
Contains the upper boundary of the surname string. |
static int |
UB_TELEPHONE_NUMBER
Contains the upper boundary of the telephone number string. |
static int |
UB_TITLE
Contains the upper boundary of the title string. |
static int |
UNKNOWN_ATTRIBUTE_TYPE
Indicates that the attribute OID is not known. |
static int |
UNSUPPORTED_ASN1_TYPE
Indicates that the particular ASN.1 type for attribute values is not supported. |
Constructor Summary |
|
AttributeValueAssertion(byte[] attributeOID,
byte[] ber)
Handles the general attribute values, including multiple value types. |
|
AttributeValueAssertion(int attributeType,
byte[] attributeOID,
byte[] ber,
int offset,
int length)
Constructs an AVA from its BER encoding. |
|
AttributeValueAssertion(int attributeType,
byte[] attributeOID,
int valueType,
String valueString)
Constructs a new AVA and initializes it with the given type and given value. |
Method Summary |
|
boolean |
equals(Object obj)
Returns |
int |
getAttributeType()
Gets the attribute type of this AVA. |
int |
getDEREncoding(byte[] encoding,
int offset)
Places the DER encoding of the AVA in this object into encoding, beginning at offset. |
int |
getDERLen()
Returns the length, in bytes, of the DER encoding of this AVA object. |
getStringAttribute()
Gets the value from this AVA. |
|
int |
getValueType()
Gets the ANS.1 value type of this AVA. |
void |
setAttributeValue(byte[] ber,
int offset,
int length)
Sets the attribute value. |
void |
setAttributeValue(String value)
Sets the attribute value. |
toString()
Returns a |
|
boolean |
valueEquals(AttributeValueAssertion other)
Returns |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNKNOWN_ATTRIBUTE_TYPE
public static final int BOUND_UNLIMITED
public static int UNSUPPORTED_ASN1_TYPE
public static final int COMMON_NAME
public static byte[] COMMON_NAME_OID
public static final int UB_COMMON_NAME
public static final int COUNTRY_NAME
public static byte[] COUNTRY_NAME_OID
public static final int COUNTRY_NAME_LENGTH
public static final int LOCALITY_NAME
public static byte[] LOCALITY_NAME_OID
public static final int UB_LOCALITY_NAME
public static final int STATE_NAME
public static byte[] STATE_NAME_OID
public static final int UB_STATE_NAME
public static final int ORGANIZATION_NAME
public static byte[] ORGANIZATION_NAME_OID
public static final int UB_ORGANIZATION_NAME
public static final int ORGANIZATIONAL_UNIT_NAME
public static byte[] ORGANIZATIONAL_UNIT_NAME_OID
public static final int UB_ORGANIZATIONAL_UNIT_NAME
public static final int TELEPHONE_NUMBER
public static byte[] TELEPHONE_NUMBER_OID
public static final int UB_TELEPHONE_NUMBER
public static final int EMAIL_ADDRESS
public static byte[] EMAIL_ADDRESS_OID
public static final int UB_EMAIL_ADDRESS
public static final int TITLE
public static byte[] TITLE_OID
public static final int UB_TITLE
public static final int STREET_ADDRESS
public static byte[] STREET_ADDRESS_OID
public static final int UB_STREET_ADDRESS
public static final int BUSINESS_CATEGORY
public static byte[] BUSINESS_CATEGORY_OID
public static final int UB_BUSINESS_CATEGORY
public static final int POSTAL_CODE
public static byte[] POSTAL_CODE_OID
public static final int UB_POSTAL_CODE
public static final int SURNAME
public static byte[] SURNAME_OID
public static final int UB_SURNAME
public static final int GIVEN_NAME
public static byte[] GIVEN_NAME_OID
public static final int UB_GIVEN_NAME
public static final int SERIAL_NUMBER
public static byte[] SERIAL_NUMBER_OID
public static final int UB_SERIAL_NUMBER
public static final int INITIALS
public static byte[] INITIALS_OID
public static final int UB_INITIALS
public static final int GENERATION_QUALIFIER
public static byte[] GENERATION_QUALIFIER_OID
public static final int UB_GENERATION_QUALIFIER
public static final int NAME
public static byte[] NAME_OID
public static final int UB_NAME
public static final int DN_QUALIFIER
public static byte[] DN_QUALIFIER_OID
public static final int UB_DN_QUALIFIER
public static final int DOMAIN_COMPONENT
public static byte[] DOMAIN_COMPONENT_OID
public static final int UB_DOMAIN_COMPONENT
public static final int POSTAL_ADDRESS
public static byte[] POSTAL_ADDRESS_OID
public static final int UB_POSTAL_ADDRESS
public static final int PSEUDONYM
public static byte[] PSEUDONYM_OID
public static final int UB_PSEUDONYM
public static final int DATE_OF_BIRTH
public static byte[] DATE_OF_BIRTH_OID
public static final int UB_DATE_OF_BIRTH
public static final int PLACE_OF_BIRTH
public static byte[] PLACE_OF_BIRTH_OID
public static final int UB_PLACE_OF_BIRTH
public static final int GENDER
public static byte[] GENDER_OID
public static final int UB_GENDER
public static final int COUNTRY_OF_CITIZENSHIP
public static byte[] COUNTRY_OF_CITIZENSHIP_OID
public static final int UB_COUNTRY_OF_CITIZENSHIP
public static final int COUNTRY_OF_RESIDENCE
public static byte[] COUNTRY_OF_RESIDENCE_OID
public static final int UB_COUNTRY_OF_RESIDENCE
Constructor Detail |
public AttributeValueAssertion(int attributeType, byte[] attributeOID, byte[] ber, int offset, int length) throws NameException
Parameters
attributeType | A flag that indicates the type of this AVA. | ||
attributeOID | A | ||
ber | The BER encoding of an AVA. | ||
offset | The offset into ber where the encoding. begins | ||
length | The length of the value in ber. |
Throws
NameException
- If the encoding is invalid or the value
of the AVA does not match its ASN.1 definition.public AttributeValueAssertion(int attributeType, byte[] attributeOID, int valueType, String valueString) throws NameException
Parameters
attributeType | A flag that indicates the type of this AVA. | ||
attributeOID | A | ||
valueType | The ASN.1 type of the value of this AVA.
If the value is zero, then the default value for
| ||
valueString | The value of this AVA is a |
Throws
NameException
- If the encoding is invalid or the value
of the AVA does not match its ASN.1 definitionpublic AttributeValueAssertion(byte[] attributeOID, byte[] ber) throws NameException
Parameters
attributeOID | A | ||
ber | A |
Throws
NameException
- If the provided AVA is invalid.Method Detail |
public int getAttributeType()
Returns
public int getValueType()
Returns
public void setAttributeValue(String value)
Parameters
value | A |
public void setAttributeValue(byte[] ber, int offset, int length) throws NameException
Parameters
ber | A | ||
offset | The offset into ber, where the encoding begins. | ||
length | The length of the value in ber. |
Throws
NameException
- If the encoding is invalid or the value
of the AVA does not match its ASN.1 definition.public String getStringAttribute() throws NameException
Returns
String
representing the value part
of the attribute.
Throws
NameException
- If the value of
this attribute cannot be
returned as a String
.public boolean equals(Object obj)
true
if this object and obj contain the
same AttributeValueAssertion
object, returns
false
otherwise.Overrides
equals
in class Object
Parameters
obj | An instance of the |
Returns
boolean
that indicates whether these objects
are equal.public boolean valueEquals(AttributeValueAssertion other)
true
if this object and other contain
the same attribute value, returns false
otherwise.
It does not analyze the contents of valueDER. It simply
compares the DER encoding of both objects byte by byte.Parameters
other | An instance of the |
Returns
boolean
that indicates whether these objects
contain the same attribute value.public String toString()
String
that describes this attribute.
Overrides
toString
in class Object
public int getDERLen()
Returns
public int getDEREncoding(byte[] encoding, int offset) throws NameException
getDERLen
. If
this object is not yet set with values, then this method
places nothing into the array and returns zero.
The ASN.1 definition of AVA is as follows:
AVA ::= SEQUENCE { OBJECT IDENTIFIER, value } |
Parameters
encoding | A | ||
offset | The offset into encoding where the encoding begins. |
Returns
Throws
NameException
- If the AVA cannot be encoded.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |