Condividi tramite


CertStore.GetCertificates(ICertSelector) Method

Definition

Returns a Collection of Certificates that match the specified selector.

[Android.Runtime.Register("getCertificates", "(Ljava/security/cert/CertSelector;)Ljava/util/Collection;", "")]
public System.Collections.Generic.ICollection<Java.Security.Cert.Certificate>? GetCertificates (Java.Security.Cert.ICertSelector? selector);
[<Android.Runtime.Register("getCertificates", "(Ljava/security/cert/CertSelector;)Ljava/util/Collection;", "")>]
member this.GetCertificates : Java.Security.Cert.ICertSelector -> System.Collections.Generic.ICollection<Java.Security.Cert.Certificate>

Parameters

selector
ICertSelector

A CertSelector used to select which Certificates should be returned. Specify null to return all Certificates (if supported).

Returns

A Collection of Certificates that match the specified selector (never null)

Attributes

Exceptions

if error(s) occur.

Remarks

Returns a Collection of Certificates that match the specified selector. If no Certificates match the selector, an empty Collection will be returned.

For some CertStore types, the resulting Collection may not contain <b>all</b> of the Certificates that match the selector. For instance, an LDAP CertStore may not search all entries in the directory. Instead, it may just search entries that are likely to contain the Certificates it is looking for.

Some CertStore implementations (especially LDAP CertStores) may throw a CertStoreException unless a non-null CertSelector is provided that includes specific criteria that can be used to find the certificates. Issuer and/or subject names are especially useful criteria.

Java documentation for java.security.cert.CertStore.getCertificates(java.security.cert.CertSelector).

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