|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.BuiltInStandardAttributes
This class builds and holds a
BuiltInStandardAttributes
object,
that is used in the GeneralName
object.
BuiltInStandardAttributes ::= SEQUENCE { country-name CountryName OPTIONAL, administration-domain-name AdministrationDomainName OPTIONAL, network-address [0] NetworkAddress OPTIONAL, terminal-identifier [1] TerminalIdentifier OPTIONAL, private-domain-name [2] PrivateDomainName OPTIONAL, organization-name [3] OrganizationName OPTIONAL, numeric-user-identifier [4] NumericUserIdentifier OPTIONAL, personal-name [5] PersonalName OPTIONAL, organizational-unit-names [6] OrganizationalUnitNames OPTIONAL } CountryName ::= [APPLICATION 1] CHOICE { x121-dcc-code NumericString (SIZE (ub-country-name-numeric-length)), iso-3166-alpha2-code PrintableString (SIZE (ub-country-name-alpha-length)) } AdministrationDomainName ::= [APPLICATION 2] CHOICE { numeric NumericString (SIZE (0..ub-domain-name-length)), printable PrintableString (SIZE (0..ub-domain-name-length)) } NetworkAddress ::= X121Address X121Address ::= NumericString (SIZE (1..ub-x121-address-length)) TerminalIdentifier ::= PrintableString (SIZE (1..ub-terminal-id-length)) PrivateDomainName ::= CHOICE { numeric NumericString (SIZE (1..ub-domain-name-length)), printable PrintableString (SIZE (1..ub-domain-name-length)) } OrganizationName ::= PrintableString (SIZE (1..ub-organization-name-length)) NumericUserIdentifier ::= NumericString (SIZE (1..ub-numeric-user-id-length)) PersonalName ::= SET { surname [0] PrintableString (SIZE (1..ub-surname-length)), given-name [1] PrintableString (SIZE (1..ub-given-name-length)) OPTIONAL, initials [2] PrintableString (SIZE (1..ub-initials-length)) OPTIONAL, generation-qualifier [3] PrintableString (SIZE (1..ub-generation-qualifier-length)) OPTIONAL } OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units) OF OrganizationalUnitName OrganizationalUnitName ::= PrintableString (SIZE (1..ub-organizational-unit-name-length)) ub-terminal-id-length INTEGER ::= 24 ub-x121-address-length INTEGER ::= 16 ub-country-name-alpha-length INTEGER ::= 2 ub-country-name-numeric-length INTEGER ::= 3 ub-organization-name-length INTEGER ::= 64 ub-organizational-unit-name-length INTEGER ::= 32 ub-organizational-units INTEGER ::= 4 ub-initials-length INTEGER ::= 5 ub-generation-qualifier-length INTEGER ::= 3 ub-given-name-length INTEGER ::= 16 ub-surname-length INTEGER ::= 40 ub-numeric-user-id-length INTEGER ::= 32 ub-domain-name-length INTEGER ::= 16 |
See Also
Constructor Summary |
|
BuiltInStandardAttributes()
The default constructor for this class. |
|
BuiltInStandardAttributes(byte[] valueBER,
int offset,
int special)
Constructs a |
Method Summary |
|
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns true if this object and obj contain the same
|
getAdminDomainName()
Gets the Administration Domain Name attribute. |
|
getCountryName()
Gets the Country Name attribute. |
|
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
|
getNetworkAddress()
Gets the Network Address attribute. |
|
static int |
getNextBEROffset(byte[] nameBER,
int offset)
Given nameBER, the BER of a
|
getNumericUserIdentifier()
Gets the Numeric User Identifier attribute. |
|
String[] |
getOrganizationalUnitNames()
Gets the Organizational Unit Names attribute. |
getOrganizationName()
Gets the Organization Name attribute. |
|
getPersonalName()
Gets the Personal Name attribute. |
|
getPrivateDomainName()
Gets the Private Domain Name attribute. |
|
getTerminalIdentifier()
Gets the Terminal Identifier attribute. |
|
void |
setAdminDomainName(ORName name)
Sets the Administration Domain Name attribute. |
void |
setCountryName(ORName name)
Sets the Country Name attribute. |
void |
setNetworkAddress(String name)
Sets the Network Address attribute. |
void |
setNumericUserIdentifier(String name)
Sets the Numeric User Identifier attribute. |
void |
setOrganizationalUnitNames(String name)
Sets the Organizational Unit Names attribute. |
void |
setOrganizationName(String name)
Sets the Organization Name attribute. |
void |
setPersonalName(PersonalName name)
Sets the Personal Name attribute. |
void |
setPrivateDomainName(ORName name)
Sets the Private Domain Name attribute. |
void |
setTerminalIdentifier(String name)
Sets the Terminal Identifier attribute. |
toString()
Returns a |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BuiltInStandardAttributes(byte[] valueBER, int offset, int special) throws NameException
BuiltInStandardAttributes
object, and
initializes it with the collection of strings
represented by valueBER.
Parameters
valueBER | A | ||
offset | The offset into valueBER where the encoding begins. | ||
special | Holds the special BER or DER circumstances, if
there are any.
The following ASN.1 constants are
possible values for special:
|
Throws
NameException
- If the encoding is invalid.public BuiltInStandardAttributes()
Method Detail |
public void setCountryName(ORName name) throws NameException
Parameters
name | An |
Throws
NameException
- If specified name
is of a wrong type.public void setAdminDomainName(ORName name) throws NameException
Parameters
name | An |
Throws
NameException
- If specified name
is of a wrong type.public void setNetworkAddress(String name) throws NameException
Parameters
name | A |
Throws
NameException
- If the specified address
is too long.public void setTerminalIdentifier(String name) throws NameException
Parameters
name | A |
Throws
NameException
- If specified identifier
is too long.public void setPrivateDomainName(ORName name) throws NameException
Parameters
name | an |
Throws
NameException
- If the specified
name is of a wrong type.public void setOrganizationName(String name) throws NameException
Parameters
name | A |
Throws
NameException
- If the
specified name is too long.public void setNumericUserIdentifier(String name) throws NameException
Parameters
name | A |
Throws
NameException
- If the
identifier is too long.public void setPersonalName(PersonalName name)
Parameters
name | A |
public void setOrganizationalUnitNames(String name) throws NameException
Parameters
name | A |
Throws
NameException
- If the
specified name is too long.public ORName getCountryName()
Returns
ORName specifying
the Country Name attribute.
public ORName getAdminDomainName()
Returns
ORName specifying
the Administration Domain Name attribute.
public String getNetworkAddress()
Returns
String
specifying
the Network Address attribute.public String getTerminalIdentifier()
Returns
String
specifying
the Terminal Identifier attribute.public ORName getPrivateDomainName()
Returns
ORName
specifying
the Private Domain Name attribute.public String getOrganizationName()
Returns
String
specifying
the Organization Name attribute.public String getNumericUserIdentifier()
Returns
String
specifying
the Numeric User Identifier attribute.public PersonalName getPersonalName()
Returns
PersonalName
specifying
the Personal Name attribute.public String[] getOrganizationalUnitNames()
Returns
String
array specifying
the Organizational Unit Names attribute.public String toString()
String
that describes this Name.
Overrides
toString
in class Object
Returns
String
describing this Name.public static int getNextBEROffset(byte[] nameBER, int offset) throws NameException
BuiltInStandardAttributes
object
beginning at offset, finds the index to the next
element in the encoding.
In other words, gets the next offset after the attributes.
For example, if the offset is 120 and the attributes' BER
encoding is 1819 bytes, this method returns 1939, the index
immediately following the attributes. That is,
nameBER[120]
is the first
byte in the encoding of the attributes,
nameBER[1938]
is the last byte in
the encoding of the Attributes, 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
int
, the index to the
next element in the BER encoding.
Throws
NameException
- If the method
cannot read the BER encoding.public int getDERLen(int special) throws NameException
BuiltInStandardAttributes
.
If this object is not set with values, returns 0
.
Parameters
special | The special DER circumstances of the encoding, if there are any. |
Returns
BuiltInStandardAttributes
.
Throws
NameException
- If the method cannot get
the length of the DER encoding.public int getDEREncoding(byte[] encoding, int offset, int special) throws NameException
BuiltInStandardAttributes
object into
encoding, beginning at offset. To determine how
long the encoding will be, call
getDERLen. If this object is
not yet set with values, this method places nothing into the array and
returns 0
. 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.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 writing begins. | ||
special | The special circumstances of the DER encoding, if there are any. |
Returns
Throws
NameException
- If the method cannot
create the DER encoding.public boolean equals(Object obj)
BuiltInStandardAttributes
; returns false otherwise.
Overrides
equals
in class Object
Parameters
obj | An instance of the
|
Returns
boolean
indicating whether
these objects are equal.public Object clone() throws CloneNotSupportedException
clone
method to get a deeper clone.
Returns
BuiltInStandardAttributes
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 |