Extensions are represented as a sequence of the extension identifier (Object Identifier), a boolean flag stating whether the extension is to be treated as being critical and the extension value itself (this is again a DER encoding of the extension value).
The ASN.1 syntax for this is:
SubjectAltName ::= GeneralNames GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
Extension
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| pack-priv GeneralNames |
| Access | Constructor and Description |
|---|---|
| public | SubjectAlternativeNameExtension(GeneralNames
the GeneralNames for the subject. names)Create a SubjectAlternativeNameExtension with the passed GeneralNames. |
| public | SubjectAlternativeNameExtension(Boolean
true if the extension is to be treated as critical. critical, GeneralNames the GeneralNames for the subject, cannot be null or empty. names)Create a SubjectAlternativeNameExtension with the specified criticality and GeneralNames. |
| public | SubjectAlternativeNameExtension(Boolean
true if the extension is to be treated as critical. critical, Object an array of DER encoded bytes of the actual value. value)Create the extension from the passed DER encoded value. |
| Modifier and Type | Method and Description |
|---|---|
| public void | encode(DerOutputStream
the DerOutputStream to write the extension to. out)Overrides sun. Implements sun. Write the extension to the OutputStream. |
| private void | |
| public String | |
| public GeneralNames | |
| public String | toString()
Overrides sun. Returns a printable representation of the SubjectAlternativeName. |
| NAME | back to summary |
|---|---|
| public static final String NAME | |
| names | back to summary |
|---|---|
| pack-priv GeneralNames names | |
| SubjectAlternativeNameExtension | back to summary |
|---|---|
| public SubjectAlternativeNameExtension(GeneralNames names) Create a SubjectAlternativeNameExtension with the passed GeneralNames. The extension is marked non-critical.
| |
| SubjectAlternativeNameExtension | back to summary |
|---|---|
| public SubjectAlternativeNameExtension(Boolean critical, GeneralNames names) Create a SubjectAlternativeNameExtension with the specified criticality and GeneralNames.
| |
| SubjectAlternativeNameExtension | back to summary |
|---|---|
| public SubjectAlternativeNameExtension(Boolean critical, Object value) throws IOException Create the extension from the passed DER encoded value.
| |
| encode | back to summary |
|---|---|
| public void encode(DerOutputStream out) Overrides sun. Implements sun. Write the extension to the OutputStream.
| |
| encodeThis | back to summary |
|---|---|
| private void encodeThis() | |
| getName | back to summary |
|---|---|
| public String getName() Overrides sun. Return the name of this extension.
| |
| getNames | back to summary |
|---|---|
| public GeneralNames getNames() Get the GeneralNames value. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides sun. Returns a printable representation of the SubjectAlternativeName. | |