Share via


SSLEngine.BeginHandshake Method

Definition

Initiates handshaking (initial or renegotiation) on this SSLEngine.

[Android.Runtime.Register("beginHandshake", "()V", "GetBeginHandshakeHandler")]
public abstract void BeginHandshake ();
[<Android.Runtime.Register("beginHandshake", "()V", "GetBeginHandshakeHandler")>]
abstract member BeginHandshake : unit -> unit
Attributes

Exceptions

if starting the handshake fails.

if the engine does not have all the needed settings (e.g. client/server mode not set).

Remarks

Initiates handshaking (initial or renegotiation) on this SSLEngine.

This method is not needed for the initial handshake, as the wrap() and unwrap() methods will implicitly call this method if handshaking has not already begun.

Note that the peer may also request a session renegotiation with this SSLEngine by sending the appropriate session renegotiate handshake message.

Unlike the SSLSocket#startHandshake() SSLSocket#startHandshake() method, this method does not block until handshaking is completed.

To force a complete SSL/TLS session renegotiation, the current session should be invalidated prior to calling this method.

Some protocols may not support multiple handshakes on an existing engine and may throw an SSLException.

Java documentation for javax.net.ssl.SSLEngine.beginHandshake().

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