Udostępnij za pośrednictwem


ISSLSession.GetPeerCertificates Method

Definition

Returns the identity of the peer which was established as part of defining the session.

[Android.Runtime.Register("getPeerCertificates", "()[Ljava/security/cert/Certificate;", "GetGetPeerCertificatesHandler:Javax.Net.Ssl.ISSLSessionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Security.Cert.Certificate[]? GetPeerCertificates ();
[<Android.Runtime.Register("getPeerCertificates", "()[Ljava/security/cert/Certificate;", "GetGetPeerCertificatesHandler:Javax.Net.Ssl.ISSLSessionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetPeerCertificates : unit -> Java.Security.Cert.Certificate[]

Returns

an ordered array of peer certificates, with the peer's own certificate first followed by any certificate authorities.

Attributes

Exceptions

if the identity of the peer is not verified.

Remarks

Returns the identity of the peer which was established as part of defining the session.

Note: This method can be used only when using certificate-based cipher suites; using it with non-certificate-based cipher suites, such as Kerberos, will throw an SSLPeerUnverifiedException.

Java documentation for javax.net.ssl.SSLSession.getPeerCertificates().

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