Share via


HandshakeCompletedEvent.GetPeerCertificateChain Method

Definition

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

[Android.Runtime.Register("getPeerCertificateChain", "()[Ljavax/security/cert/X509Certificate;", "GetGetPeerCertificateChainHandler")]
public virtual Javax.Security.Cert.X509Certificate[]? GetPeerCertificateChain ();
[<Android.Runtime.Register("getPeerCertificateChain", "()[Ljavax/security/cert/X509Certificate;", "GetGetPeerCertificateChainHandler")>]
abstract member GetPeerCertificateChain : unit -> Javax.Security.Cert.X509Certificate[]
override this.GetPeerCertificateChain : unit -> Javax.Security.Cert.X509Certificate[]

Returns

an ordered array of peer X.509 certificates, with the peer's own certificate first followed by any certificate authorities. (The certificates are in the original JSSE javax.security.cert.X509Certificate format).

Attributes

Exceptions

if the identity of the peer has not been verified.

Remarks

Returns the identity of the peer which was identified 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.

<em>Note: this method exists for compatibility with previous releases. New applications should use #getPeerCertificates instead.</em>

Java documentation for javax.net.ssl.HandshakeCompletedEvent.getPeerCertificateChain().

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