AlternativeNamepublic class AlternativeName extends ExtensionValue This class implements the values of Subject Alternative Name
(OID is 2.5.29.17) and Issuer Alternative Name extensions
(OID is 2.5.29.18).
For more information about these extensions see RFC 3280
at http://www.ietf.org/rfc/rfc3280.txt |
Fields Summary |
---|
public static final boolean | ISSUER | public static final boolean | SUBJECT | private boolean | which | private GeneralNames | alternativeNames |
Constructors Summary |
---|
public AlternativeName(boolean which, GeneralNames alternativeNames)Creates the extension object for given alternative names.
this.which = which;
this.alternativeNames = alternativeNames;
| public AlternativeName(boolean which, byte[] encoding)Creates the extension object on the base of its encoded form.
super(encoding);
this.which = which;
this.alternativeNames =
(GeneralNames) GeneralNames.ASN1.decode(encoding);
|
Methods Summary |
---|
public void | dumpValue(java.lang.StringBuffer buffer, java.lang.String prefix)Places the string representation of extension value
into the StringBuffer object.
buffer.append(prefix).append((which) ? "Subject" : "Issuer") //$NON-NLS-1$ //$NON-NLS-2$
.append(" Alternative Names [\n"); //$NON-NLS-1$
alternativeNames.dumpValue(buffer, prefix + " "); //$NON-NLS-1$
buffer.append(prefix).append("]\n"); //$NON-NLS-1$
| public java.util.List | getAlternativeNames()Returns the list of alternative names.
The list is in the collection of pairs:
[Integer (tag of GeneralName), Object (name value)]
return alternativeNames.getPairsList();
| public byte[] | getEncoded()Returns ASN.1 encoded form of this X.509 AlternativeName value.
if (encoding == null) {
encoding = GeneralNames.ASN1.encode(alternativeNames);
}
return encoding;
|
|