|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.X509V3Extension | +--com.rsa.certj.cert.extensions.SubjectAltName
This class builds and holds the
SubjectAltName
extension. It allows
additional identities to be bound to the subject of
the certificate. Defined options include an Internet
electronic mail address, a DNS name, an IP address,
and a uniform resource identifier (URI). Other options
exist, including completely local definitions.
Multiple name forms, and multiple instances of each
name form, may be included. Whenever such identities
are to be bound into a certificate, the subject
alternative name (or issuer alternative name)
extension should be used.
subjectAltName
extension must be
present. If the certificate’s subject
field contains an empty sequence, then the
subjectAltName
extension must be marked critical. Subject alternative names may be constrained
in the same manner as subject distinguished names
using the name constraints extension. Unlike the
certificate’s subject
field, conforming
CAs must not issue certificates with
subjectAltNames
containing empty
GeneralName
fields.
The ASN.1 definition is defined as follows:
subjectAltName EXTENSION ::= { SYNTAX GeneralNames IDENTIFIED BY id-ce-subjectAltName } GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName GeneralName ::= CHOICE { otherName [0] OCTET STRING rfc822Name [1] IA5String dNSName [2] IA5String x400Address [3] OCTET STRING directoryName [4] Name ediPartyName [5] EDIPartyName uniformResourceIdentifier [6] IA5String iPAddress [7] OCTET STRING registeredID [8] OBJECT IDENTIFIER } |
See Also
Constructor Summary |
|
SubjectAltName()
Constructs an empty |
|
SubjectAltName(GeneralNames name,
boolean criticality)
Constructs a |
Method Summary |
|
void |
addGeneralName(GeneralName name)
Adds an alternative name to the subject of the certificate. |
clone()
Overrides the default |
|
void |
decodeValue(byte[] valueBER,
int offset)
Decode the value. |
int |
derEncodeValue(byte[] encoding,
int offset)
Place the encoding of the value into encoding, beginning at offset. |
int |
derEncodeValueInit()
Initialize for encoding the value. |
getGeneralNames()
Gets the alternative names for the subject from this extension. |
|
void |
setGeneralNames(GeneralNames names)
Sets the alternative names for the subject and resets any alternative names previously set. |
Methods inherited from class com.rsa.certj.cert.extensions.X509V3Extension |
extend, getCriticality, getDEREncoding, getDERLen, getExtensionType, getExtensionTypeString, getInstance, getNextBEROffset, isExtensionType, setCriticality, setEncoding, setSpecialOID, setStandardOID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SubjectAltName()
subjectAltName
object.public SubjectAltName(GeneralNames name, boolean criticality) throws CertificateException
SubjectAltName
object and
initializes it with the given values.Parameters
name | A | ||
criticality | The user-specified criticality. |
Throws
CertificateException
- If there is cloning error, or
if name is null
.Method Detail |
public void addGeneralName(GeneralName name)
Parameters
name | The alternative subject name to add. |
public void setGeneralNames(GeneralNames names) throws CertificateException
Parameters
names | The alternative names for the subject. |
Throws
CertificateException
- If there is cloning error.public GeneralNames getGeneralNames()
Returns
public void decodeValue(byte[] valueBER, int offset) throws CertificateException
Overrides
decodeValue
in class X509V3Extension
Parameters
valueBER | The BER encoding of the extension's value. | ||
offset | The offset into valueBER where the encoding begins. |
Throws
CertificateException
- If the encoding is invalid for this
extension.public int derEncodeValueInit()
Overrides
derEncodeValueInit
in class X509V3Extension
Returns
public int derEncodeValue(byte[] encoding, int offset)
Overrides
derEncodeValue
in class X509V3Extension
Parameters
encoding | The byte array into which the result will be placed. | ||
offset | The offest into encoding where the writing is to begin. |
Returns
public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Overrides
clone
in class X509V3Extension
Returns
SubjectAltName
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 |