Udostępnij za pośrednictwem


HttpsURLConnection.GetLocalCertificates Method

Definition

Returns the certificate(s) that were sent to the server during handshaking.

[Android.Runtime.Register("getLocalCertificates", "()[Ljava/security/cert/Certificate;", "GetGetLocalCertificatesHandler")]
public abstract Java.Security.Cert.Certificate[]? GetLocalCertificates ();
[<Android.Runtime.Register("getLocalCertificates", "()[Ljava/security/cert/Certificate;", "GetGetLocalCertificatesHandler")>]
abstract member GetLocalCertificates : unit -> Java.Security.Cert.Certificate[]

Returns

an ordered array of certificates, with the client's own certificate first followed by any certificate authorities. If no certificates were sent, then null is returned.

Attributes

Exceptions

if no connection has been established yet.

Remarks

Returns the certificate(s) that were sent to the server during handshaking.

Note: This method is useful only when using certificate-based cipher suites.

When multiple certificates are available for use in a handshake, the implementation chooses what it considers the "best" certificate chain available, and transmits that to the other side. This method allows the caller to know which certificate chain was actually sent.

Java documentation for javax.net.ssl.HttpsURLConnection.getLocalCertificates().

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