Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Mono.Android/Test/System.Net/SslTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public void Properties_Invalid ()
}
}
}

#if TODO
[Test]
public void Send_Complete_Default ()
Expand Down Expand Up @@ -792,7 +793,7 @@ public void Send_Complete_Error ()
}
}
}
#endif

[Test]
public void Send_Content_Get ()
{
Expand Down Expand Up @@ -893,6 +894,7 @@ public void Send_Content_Put_CustomStream ()
}
}
}
#endif // TODO

[Test]
public void Send_Invalid ()
Expand Down
11 changes: 8 additions & 3 deletions src/monodroid/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 4 additions & 3 deletions src/monodroid/monodroid.targets
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
DependsOnTargets="_GenerateIncludeFiles;_BuildAndroidRuntimes;_BuildHostRuntimes">
</Target>
<Target Name="_GenerateIncludeFiles"
Inputs="@(_EmbeddedBlob)"
Outputs="@(_EmbeddedBlob->'jni\%(Include)')">
Inputs="@(_EmbeddedBlob);jni/config.h"
Outputs="@(_EmbeddedBlob->'jni\%(Include)');$(OutputPath)\..\..\..\..\..\include\config.h">
<Copy SourceFiles="jni/config.h" DestinationFiles="$(OutputPath)\..\..\..\..\..\include\config.h" />
<Exec Command="(cat &quot;@(_EmbeddedBlob)&quot; ; dd if=/dev/zero bs=1 count=1 2>/dev/null) > %(_EmbeddedBlob.Config)" />
<Exec Command="xxd -i %(_EmbeddedBlob.Config) | sed 's/^unsigned /static const unsigned /g' > jni/%(_EmbeddedBlob.Include)" />
<Exec Command="rm %(_EmbeddedBlob.Config)" />
Expand All @@ -52,7 +53,7 @@
Outputs="@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(Identity)\libmono-android.debug.so');@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(Identity)\libmono-android.release.so')">
<PropertyGroup>
<_AppAbi>@(AndroidSupportedTargetJitAbi->'%(Identity)', ' ')</_AppAbi>
<_NdkBuildArgs>CONFIGURATION=$(Configuration) SGEN_BRIDGE_VERSION=$(MonoSgenBridgeVersion)</_NdkBuildArgs>
<_NdkBuildArgs>CONFIGURATION=$(Configuration) SGEN_BRIDGE_VERSION=$(MonoSgenBridgeVersion) MONO_PATH="$(MonoSourceFullPath)"</_NdkBuildArgs>
</PropertyGroup>
<WriteLinesToFile
File="jni\Application.mk"
Expand Down