Share via


X509CertSelector.PathToNames Property

Definition

Returns a copy of the pathToNames criterion. -or- Sets the pathToNames criterion.

public virtual System.Collections.Generic.ICollection<System.Collections.Generic.IList<object>>? PathToNames { [Android.Runtime.Register("getPathToNames", "()Ljava/util/Collection;", "GetGetPathToNamesHandler")] get; [Android.Runtime.Register("setPathToNames", "(Ljava/util/Collection;)V", "GetSetPathToNames_Ljava_util_Collection_Handler")] set; }
[<get: Android.Runtime.Register("getPathToNames", "()Ljava/util/Collection;", "GetGetPathToNamesHandler")>]
[<set: Android.Runtime.Register("setPathToNames", "(Ljava/util/Collection;)V", "GetSetPathToNames_Ljava_util_Collection_Handler")>]
member this.PathToNames : 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 pathToNames criterion. The X509Certificate must not include name constraints that would prohibit building a path to the specified names. If the value returned is null, no pathToNames 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 pathToNames 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 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 #addPathToName(int type, String name) addPathToName(int type, String name) and #addPathToName(int type, byte [] name) addPathToName(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.getPathToNames().

Property setter documentation:

Sets the pathToNames criterion. The X509Certificate must not include name constraints that would prohibit building a path to the specified names.

This method allows the caller to specify, with a single method call, the complete set of names which the X509Certificates's name constraints must permit. The specified value replaces the previous value for the pathToNames criterion.

This constraint is useful when building a certification path forward (from the target toward the trust anchor. If a partial path has been built, any candidate certificate must not include name constraints that would prohibit building a path to any of the names in the partial path.

The names parameter (if not null) is a Collection with one entry for each name to be included in the pathToNames 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 pathToNames check will be performed.

Each 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 #addPathToName(int type, String name) addPathToName(int type, String name) and #addPathToName(int type, byte [] name) addPathToName(int type, byte [] name).

<strong>Note:</strong> for distinguished names, specify the byte array form instead of the String form. See the note in #addPathToName(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 #getPathToNames getPathToNames method.

Note that a deep copy is performed on the Collection to protect against subsequent modifications.

Java documentation for java.security.cert.X509CertSelector.setPathToNames(java.util.Collection<java.util.List<?>>).

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.

Applies to