X509CertSelector.SubjectAlternativeNames Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a copy of the subjectAlternativeNames criterion. -or- Sets the subjectAlternativeNames criterion.
public virtual System.Collections.Generic.ICollection<System.Collections.Generic.IList<object>>? SubjectAlternativeNames { [Android.Runtime.Register("getSubjectAlternativeNames", "()Ljava/util/Collection;", "GetGetSubjectAlternativeNamesHandler")] get; [Android.Runtime.Register("setSubjectAlternativeNames", "(Ljava/util/Collection;)V", "GetSetSubjectAlternativeNames_Ljava_util_Collection_Handler")] set; }
[<get: Android.Runtime.Register("getSubjectAlternativeNames", "()Ljava/util/Collection;", "GetGetSubjectAlternativeNamesHandler")>]
[<set: Android.Runtime.Register("setSubjectAlternativeNames", "(Ljava/util/Collection;)V", "GetSetSubjectAlternativeNames_Ljava_util_Collection_Handler")>]
member this.SubjectAlternativeNames : System.Collections.Generic.ICollection<System.Collections.Generic.IList<obj>> with get, set
Property Value
a Collection
of names (or null
)
- Attributes
Remarks
Property getter documentation:
Returns a copy of the subjectAlternativeNames criterion. The X509Certificate
must contain all or at least one of the specified subjectAlternativeNames, depending on the value of the matchAllNames flag (see #getMatchAllSubjectAltNames getMatchAllSubjectAltNames
). If the value returned is null
, no subjectAlternativeNames check will be performed.
If the value returned is not null
, it is a Collection
with one entry for each name to be included in the subject alternative name criterion. Each entry is a List
whose first entry is an Integer
(the name type, 0-8) and whose second entry is a String
or a byte array (the name, in string or ASN.1 DER encoded form, respectively). There can be multiple names of the same type. Note that the Collection
returned may contain duplicate names (same name and name type).
Each subject alternative name in the Collection
may be specified either as a String
or as an ASN.1 encoded byte array. For more details about the formats used, see #addSubjectAlternativeName(int type, String name) addSubjectAlternativeName(int type, String name)
and #addSubjectAlternativeName(int type, byte [] name) addSubjectAlternativeName(int type, byte [] name)
.
Note that a deep copy is performed on the Collection
to protect against subsequent modifications.
Java documentation for java.security.cert.X509CertSelector.getSubjectAlternativeNames()
.
Property setter documentation:
Sets the subjectAlternativeNames criterion. The X509Certificate
must contain all or at least one of the specified subjectAlternativeNames, depending on the value of the matchAllNames flag (see #setMatchAllSubjectAltNames setMatchAllSubjectAltNames
).
This method allows the caller to specify, with a single method call, the complete set of subject alternative names for the subjectAlternativeNames criterion. The specified value replaces the previous value for the subjectAlternativeNames criterion.
The names
parameter (if not null
) is a Collection
with one entry for each name to be included in the subject alternative name criterion. Each entry is a List
whose first entry is an Integer
(the name type, 0-8) and whose second entry is a String
or a byte array (the name, in string or ASN.1 DER encoded form, respectively). There can be multiple names of the same type. If null
is supplied as the value for this argument, no subjectAlternativeNames check will be performed.
Each subject alternative name in the Collection
may be specified either as a String
or as an ASN.1 encoded byte array. For more details about the formats used, see #addSubjectAlternativeName(int type, String name) addSubjectAlternativeName(int type, String name)
and #addSubjectAlternativeName(int type, byte [] name) addSubjectAlternativeName(int type, byte [] name)
.
<strong>Note:</strong> for distinguished names, specify the byte array form instead of the String form. See the note in #addSubjectAlternativeName(int, String)
for more information.
Note that the names
parameter can contain duplicate names (same name and name type), but they may be removed from the Collection
of names returned by the #getSubjectAlternativeNames getSubjectAlternativeNames
method.
Note that a deep copy is performed on the Collection
to protect against subsequent modifications.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.