diff --git a/src/Mono.Android/Test/System.Net/SslTest.cs b/src/Mono.Android/Test/System.Net/SslTest.cs index b6d1fb92667..1236a4f5410 100644 --- a/src/Mono.Android/Test/System.Net/SslTest.cs +++ b/src/Mono.Android/Test/System.Net/SslTest.cs @@ -27,7 +27,7 @@ public void SslWithinTasksShouldWork () Exception exception = null; var thread = new Thread (() => { - string url = "https://pipeline.internalx.com/"; + string url = "https://tlstest-1.xamdev.com/"; var downloadTask = new WebClient ().DownloadDataTaskAsync (url); var completeTask = downloadTask.ContinueWith (t => { diff --git a/src/Mono.Android/Test/Xamarin.Android.Net/AndroidClientHandlerTests.cs b/src/Mono.Android/Test/Xamarin.Android.Net/AndroidClientHandlerTests.cs index 51e491c73ab..9412035e95a 100644 --- a/src/Mono.Android/Test/Xamarin.Android.Net/AndroidClientHandlerTests.cs +++ b/src/Mono.Android/Test/Xamarin.Android.Net/AndroidClientHandlerTests.cs @@ -164,15 +164,24 @@ public void Tls_1_2_Url_Works () [Test] public void Sanity_Tls_1_2_Url_WithMonoClientHandlerFails () { + var tlsProvider = global::System.Environment.GetEnvironmentVariable ("XA_TLS_PROVIDER"); + var supportTls1_2 = tlsProvider.Equals ("btls", StringComparison.OrdinalIgnoreCase); using (var c = new HttpClient (new HttpClientHandler ())) { try { var tr = c.GetAsync (Tls_1_2_Url); tr.Wait (); tr.Result.EnsureSuccessStatusCode (); - Assert.Fail ("SHOULD NOT BE REACHED: Mono's HttpClientHandler doesn't support TLS 1.2."); + if (!supportTls1_2) { + Assert.Fail ("SHOULD NOT BE REACHED: Mono's HttpClientHandler doesn't support TLS 1.2."); + } } catch (AggregateException e) { - Assert.IsTrue (e.InnerExceptions.Any (ie => ie is WebException)); + if (supportTls1_2) { + Assert.Fail ("SHOULD NOT BE REACHED: BTLS is present, TLS 1.2 should work."); + } + if (!supportTls1_2) { + Assert.IsTrue (e.InnerExceptions.Any (ie => ie is WebException)); + } } } } diff --git a/src/Mono.Android/Test/Xamarin.Android.Net/HttpClientIntegrationTests.cs b/src/Mono.Android/Test/Xamarin.Android.Net/HttpClientIntegrationTests.cs index da9c26e7eae..5417e17a80f 100644 --- a/src/Mono.Android/Test/Xamarin.Android.Net/HttpClientIntegrationTests.cs +++ b/src/Mono.Android/Test/Xamarin.Android.Net/HttpClientIntegrationTests.cs @@ -202,6 +202,7 @@ public void Properties_Invalid () } } } + #if TODO [Test] public void Send_Complete_Default () @@ -792,7 +793,7 @@ public void Send_Complete_Error () } } } -#endif + [Test] public void Send_Content_Get () { @@ -893,6 +894,7 @@ public void Send_Content_Put_CustomStream () } } } +#endif // TODO [Test] public void Send_Invalid () diff --git a/src/monodroid/jni/Android.mk b/src/monodroid/jni/Android.mk index ed7602a5b1f..f43b982035c 100644 --- a/src/monodroid/jni/Android.mk +++ b/src/monodroid/jni/Android.mk @@ -37,17 +37,22 @@ LOCAL_LDFLAGS += \ -Wl,--no-undefined \ LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/../../../bin/$(CONFIGURATION)/include \ $(LOCAL_PATH)/../../../bin/$(CONFIGURATION)/include/$(TARGET_ARCH_ABI)/eglib \ - $(LOCAL_PATH)/../../../external/mono/eglib/src \ + "$(MONO_PATH)/eglib/src" \ $(LOCAL_PATH)/zip LOCAL_LDLIBS := -llog -lz -lstdc++ LOCAL_MODULE := monodroid +# Note: `$(MONO_PATH)` *cannot* contain spaces, because we can't quote it. +# Should we try to, `ndk-build` ignores the file with the warning: +# Android NDK: ".../mono/support/nl.c" ".../mono/support/zlib-helper.c" +# Android NDK: WARNING: Unsupported source file extensions in jni/Android.mk for module monodroid LOCAL_SRC_FILES := \ - ../../../external/mono/support/nl.c \ - ../../../external/mono/support/zlib-helper.c \ + $(MONO_PATH)/support/nl.c \ + $(MONO_PATH)/support/zlib-helper.c \ dylib-mono.c \ embedded-assemblies.c \ jni.c \ diff --git a/src/monodroid/monodroid.targets b/src/monodroid/monodroid.targets index 2fd52a522d3..840fd7e5672 100644 --- a/src/monodroid/monodroid.targets +++ b/src/monodroid/monodroid.targets @@ -41,8 +41,9 @@ DependsOnTargets="_GenerateIncludeFiles;_BuildAndroidRuntimes;_BuildHostRuntimes"> + Inputs="@(_EmbeddedBlob);jni/config.h" + Outputs="@(_EmbeddedBlob->'jni\%(Include)');$(OutputPath)\..\..\..\..\..\include\config.h"> + @@ -52,7 +53,7 @@ Outputs="@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(Identity)\libmono-android.debug.so');@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(Identity)\libmono-android.release.so')"> <_AppAbi>@(AndroidSupportedTargetJitAbi->'%(Identity)', ' ') - <_NdkBuildArgs>CONFIGURATION=$(Configuration) SGEN_BRIDGE_VERSION=$(MonoSgenBridgeVersion) + <_NdkBuildArgs>CONFIGURATION=$(Configuration) SGEN_BRIDGE_VERSION=$(MonoSgenBridgeVersion) MONO_PATH="$(MonoSourceFullPath)"