Sdílet prostřednictvím


SSLCertificateSocketFactory.GetInsecure(Int32, SSLSessionCache) Method

Definition

Returns a new instance of a socket factory with all SSL security checks disabled, using an optional handshake timeout and SSL session cache.

[Android.Runtime.Register("getInsecure", "(ILandroid/net/SSLSessionCache;)Ljavax/net/ssl/SSLSocketFactory;", "")]
public static Javax.Net.Ssl.SSLSocketFactory? GetInsecure (int handshakeTimeoutMillis, Android.Net.SSLSessionCache? cache);
[<Android.Runtime.Register("getInsecure", "(ILandroid/net/SSLSessionCache;)Ljavax/net/ssl/SSLSocketFactory;", "")>]
static member GetInsecure : int * Android.Net.SSLSessionCache -> Javax.Net.Ssl.SSLSocketFactory

Parameters

handshakeTimeoutMillis
Int32

to use for SSL connection handshake, or 0 for none. The socket timeout is reset to 0 after the handshake.

cache
SSLSessionCache

The SSLSessionCache to use, or null for no cache.

Returns

an insecure SSLSocketFactory with the specified parameters

Attributes

Remarks

Returns a new instance of a socket factory with all SSL security checks disabled, using an optional handshake timeout and SSL session cache.

<p class="caution"><b>Warning:</b> Sockets created using this factory are vulnerable to person-in-the-middle attacks!</p>

Java documentation for android.net.SSLCertificateSocketFactory.getInsecure(int, android.net.SSLSessionCache).

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