NtlmAuthState connect_ntlm_auth_state;
HttpWebRequest connect_request;
- bool ssl;
Exception connect_exception;
static object classLock = new object ();
- IMonoTlsProvider tlsProvider;
MonoTlsStream tlsStream;
-#if MONOTOUCH
+#if MONOTOUCH && !MONOTOUCH_TV && !MONOTOUCH_WATCH
[System.Runtime.InteropServices.DllImport ("__Internal")]
static extern void xamarin_start_wwan (string uri);
#endif
IPHostEntry hostEntry = sPoint.HostEntry;
if (hostEntry == null) {
-#if MONOTOUCH
+#if MONOTOUCH && !MONOTOUCH_TV && !MONOTOUCH_WATCH
xamarin_start_wwan (sPoint.Address.ToString ());
hostEntry = sPoint.HostEntry;
if (hostEntry == null) {
status = sPoint.UsesProxy ? WebExceptionStatus.ProxyNameResolutionFailure :
WebExceptionStatus.NameResolutionFailure;
return;
-#if MONOTOUCH
+#if MONOTOUCH && !MONOTOUCH_TV && !MONOTOUCH_WATCH
}
#endif
}
}
}
- void EnsureSSLStreamAvailable (HttpWebRequest request)
- {
- tlsProvider = request.TlsProvider;
- if (tlsProvider != null)
- return;
-
- tlsProvider = MonoTlsProviderFactory.GetProviderInternal ();
- }
-
bool CreateTunnel (HttpWebRequest request, Uri connectUri,
Stream stream, out byte[] buffer)
{
if (request.Address.Scheme == Uri.UriSchemeHttps) {
#if SECURITY_DEP
- ssl = true;
- EnsureSSLStreamAvailable (request);
if (!reused || nstream == null || tlsStream == null) {
byte [] buffer = null;
if (sPoint.UseConnect) {
throw new NotSupportedException ();
#endif
} else {
- ssl = false;
nstream = serverStream;
}
} catch (Exception ex) {