|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.crmf.RegInfo
This class contains the RegInfo field from CertReqMsg message, defined in CertificateRequest Message Format (RFC 2511).
regInfo SEQUENCE SIZE (1...MAX) of AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type OBJECT IDENTIFIER, value ANY DEFINED BY type } id-pkix OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) 7 } id-pkip OBJECT IDENTIFIER ::= { id-pkix 5 } id-regInfo OBJECT IDENTIFIER ::= { id-pkip id-regInfo(2) } id-regInfo-utf8Pairs OBJECT IDENTIFIER ::= { id-regInfo 1 } |
Name Value ---------- version -- version of this variation of regInfo use corp_company -- company affiliation of subscriber org_unit -- organizational unit mail_firstName -- personal name component mail_middleName -- personal name component mail_lastName -- personal name component mail_email -- subscriber's email address jobTitle -- job title of subscriber employeeID -- employee identification number or string mailStop -- mail stop issuerName -- name of CA subjectName -- name of Subject validity -- validity interval For example: version?1%corp_company?Acme, Inc.%org_unit?Engineering% mail_firstName?John%mail_lastName?Smith%jobTitle?Team Leader% mail_email?john@acme.com% |
See Also
Field Summary |
|
static byte[] |
REG_INFO_OID
This defines RegInfo OID. |
Constructor Summary |
|
RegInfo()
The default constructor for this class. |
|
RegInfo(byte[] regInfoBER,
int offset,
int special)
Creates a RegInfo object that contains the values given. |
|
RegInfo(String name,
String value)
Creates a RegInfo object that contains the values given. |
Method Summary |
|
void |
addNameValuePair(String name,
String value,
boolean newRegInfo)
Adds name / value pair to the RegInfo object. |
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns true if this object and obj contain the same RegInfo, returns false otherwise. |
getAttribute(int index)
Gets the attribute value, specified by |
|
int |
getDEREncoding(byte[] encoding,
int offset,
int special)
Places the DER encoding of the RegInfo object into encoding, beginning at offset. |
int |
getDERLen(int special)
Returns the number of bytes that will be used by the DER encoding of this regInfo. |
static int |
getNextBEROffset(byte[] infoBER,
int offset)
Given infoBER, the BER of a RegInfo beginning at offset, finds the index to the next element in the encoding. |
int |
getRegInfoCount()
Gets the number of attributes in this RegInfo object. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte[] REG_INFO_OID
Constructor Detail |
public RegInfo()
public RegInfo(String name, String value) throws CRMFException
Parameters
name | The name of the attribute | ||
value | The value of the attribute |
Throws
CRMFException
- If passed in values are null.public RegInfo(byte[] regInfoBER, int offset, int special) throws CRMFException
Parameters
regInfoBER | The byte array that contains BER encoding of this object | ||
offset | Offset in this array | ||
special | Set that argument to any special instructions of the DER encoding. |
Throws
CRMFException
- If encoding is invalidMethod Detail |
public void addNameValuePair(String name, String value, boolean newRegInfo) throws CRMFException
Parameters
name | The name of the attribute | ||
value | The value of the attribute | ||
newRegInfo | If true, we add this name/value pair to the new attribute, otherwise we attach this name/value pair to the last created attribute. For example, if newRegInfo is set to false, and name is set to "corp_company", and the value is set to "Acme, Inc." and we already had an attribute with value "version?1%", we just concatenate the new name/value pair to the old one: version?1%corp_company?Acme, Inc.% |
Throws
CRMFException
- If passed in values are null.public String getAttribute(int index) throws CRMFException
index
Parameters
index | Index into RegInfo, that specifies the attribute. |
Throws
CRMFException
- If this index
is invalidpublic int getRegInfoCount()
Returns
public static int getNextBEROffset(byte[] infoBER, int offset) throws CRMFException
Parameters
infoBER | The BER encoding of a RegInfo. | ||
offset | The offset into infoBER where the encoding begins. |
Returns
Throws
CRMFException
- If the method cannot read the BER encoding.public int getDERLen(int special) throws CRMFException
Parameters
special | The special DER circumstances of the encoding, if there are any. |
Returns
public int getDEREncoding(byte[] encoding, int offset, int special) throws CRMFException
extension [1] IMPLICIT Extension |
APP_IMPLICIT
, APP_EXPLICIT
,
PRIVATE_IMPLICIT
, PRIVATE_EXPLICIT
,
OPTIONAL
, DEFAULT
,
CONTEXT_IMPLICIT
,
or CONTEXT_EXPLICIT
.Parameters
encoding | The byte array into which the result will be placed. | ||
offset | The offset into encoding where the writing is to begin. | ||
special | The special DER circumstances of the encoding, if there are any. |
Returns
public boolean equals(Object obj)
Overrides
equals
in class Object
Parameters
obj | The instance of RegInfo object |
Returns
boolean
that indicates whether
these objects are equal.public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
GeneralNames
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 |