Skip to content

Commit

Permalink
Bump to dotnet/installer@5c2d8ef 6.0.100-rc.2.21418.44 (#6204)
Browse files Browse the repository at this point in the history
Changes: dotnet/installer@78a1bc3...5c2d8ef
Changes: dotnet/linker@5b2391c...5b2391c
Changes: dotnet/runtime@14b34eb...5a5d7f0

Context: https://github.com/dotnet/runtime/blob/0f5b75344d5858d76da403735ee34c71d9d69d54/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs#L776
Context: dotnet/runtime@57dd919
Context: dotnet/runtime#56089
Context: dotnet/runtime#57800

Updates:

* Microsoft.Dotnet.Sdk.Internal: from 6.0.100-rc.1.21418.8 to 6.0.100-rc.2.21418.44
* Microsoft.NET.ILLink.Tasks: from 6.0.100-preview.6.21416.1 to 6.0.100-preview.6.21418.3
* Microsoft.NETCore.App.Ref: from 6.0.0-rc.1.21417.1 to 6.0.0-rc.2.21417.16

Update `Xamarin.Android.Net.AndroidMessageHandler` so that additional
properties are specified.  Commit dotnet/runtime@57dd919a updated
`HttpMessageHandler` so that additional properties were no longer
"unsupported" on Android, meaning they needed to exist.  As they
didn't yet exist, the linker emitted warnings:

	ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetClientCertificateOptions(): No members were resolved for 'get_ClientCertificateOptions'.
	ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetClientCertificates(): No members were resolved for 'get_ClientCertificates'.
	ILLink : warning IL2037: System.Net.Http.HttpClientHandler.SetClientCertificateOptions(ClientCertificateOption): No members were resolved for 'set_ClientCertificateOptions'.

We need to add the missing members that are now expected:

	partial class AndroidMessageHandler {
	    public ClientCertificateOption ClientCertificateOptions { get; set; }
	    public X509CertificateCollection ClientCertificates { get; set; }
	    // …
	}

Note that these new properties *must* be public, as
`Type.GetMethod(string)` is used, which only finds public members.

We can also update `AndroidClientHandlerTests.cs` and remove the
`catch(TargetInvocationException)` blocks added in 1e5bfa3, as
dotnet/runtime#56089 has been fixed.

Begin ignoring `AotTests.NoSymbolsArgShouldReduceAppSize()`, as it
started failing.  See dotnet/runtime#57800.

Finally, `SslProtocols.Tls13` is only valid on API-29+.
Update `AndroidMessageHandler.SslProtocols` so that
`SslProtocols.Tls13` is only used on appropriate platforms.

Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
  • Loading branch information
dotnet-maestro[bot] and jonathanpeppers authored Aug 22, 2021
1 parent d304060 commit 1dbb547
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 21 deletions.
10 changes: 5 additions & 5 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-rc.1.21418.8">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-rc.2.21418.44">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>78a1bc32ce1ec6a18d4e2b759e08de11aee37b43</Sha>
<Sha>5c2d8ef2b3e254260f7c703d8d35d2f2c5b43d97</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21416.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21418.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/mono/linker</Uri>
<Sha>5b2391c2c56af47350a5789375e8dbddc692e67f</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-rc.1.21417.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-rc.2.21417.16" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>14b34eb02bc8969b77c0d3a1e39fb38f450625cf</Sha>
<Sha>5a5d7f0518b564e7f840c6c939bb6618c778b21b</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-rc.1.21418.8</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.100-preview.6.21416.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-rc.2.21418.44</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.100-preview.6.21418.3</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>5.0.0-beta.20181.7</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>6.0.0-beta.21212.6</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-rc.1.21417.1</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-rc.2.21417.16</MicrosoftNETCoreAppRefPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Trim all characters after first `-` or `+` is encountered. -->
Expand Down
29 changes: 25 additions & 4 deletions src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -70,9 +72,9 @@ sealed class RequestRedirectionState
// uncompress it any longer, doh. And they don't support 'deflate' so we need to handle it ourselves.
bool decompress_here;

internal const bool SupportsAutomaticDecompression = true;
internal const bool SupportsProxy = true;
internal const bool SupportsRedirectConfiguration = true;
public bool SupportsAutomaticDecompression => true;
public bool SupportsProxy => true;
public bool SupportsRedirectConfiguration => true;

public DecompressionMethods AutomaticDecompression
{
Expand All @@ -93,7 +95,7 @@ public CookieContainer CookieContainer
}

// NOTE: defaults here are based on:
// https://github.com/dotnet/runtime/blob/ccfe21882e4a2206ce49cd5b32d3eb3cab3e530f/src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs
// https://github.com/dotnet/runtime/blob/f3b77e64b87895aa7e697f321eb6d4151a4333df/src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs

public bool UseCookies { get; set; } = true;

Expand All @@ -107,6 +109,25 @@ public CookieContainer CookieContainer

public bool AllowAutoRedirect { get; set; } = true;

public ClientCertificateOption ClientCertificateOptions { get; set; }

public X509CertificateCollection ClientCertificates { get; set; }

public ICredentials DefaultProxyCredentials { get; set; }

public int MaxConnectionsPerServer { get; set; } = int.MaxValue;

public int MaxResponseHeadersLength { get; set; } = 64; // Units in K (1024) bytes.

public bool CheckCertificateRevocationList { get; set; } = false;

// See: https://developer.android.com/reference/javax/net/ssl/SSLSocket#protocols
public SslProtocols SslProtocols { get; set; } =
(int)Build.VERSION.SdkInt >= 29 ?
SslProtocols.Tls13 | SslProtocols.Tls12 : SslProtocols.Tls12;

public IDictionary<string, object?> Properties { get; set; }

int maxAutomaticRedirections = 50;

public int MaxAutomaticRedirections
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ public static void Foo () {
[Category ("LLVM")]
public void NoSymbolsArgShouldReduceAppSize ([Values ("", "Hybrid")] string androidAotMode)
{
if (Builder.UseDotNet) {
Assert.Ignore ("https://github.com/dotnet/runtime/issues/57800");
}

AssertAotModeSupported (androidAotMode);

var proj = new XamarinAndroidApplicationProject () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ public void Properties_Defaults ()
Assert.IsTrue (h.UseCookies, "#12");
Assert.IsFalse (h.UseDefaultCredentials, "#13");
Assert.IsTrue (h.UseProxy, "#14");
try {
Assert.AreEqual (ClientCertificateOption.Manual, h.ClientCertificateOptions, "#15");
} catch (PlatformNotSupportedException) {
// https://github.com/dotnet/runtime/blob/07336810acf3b4e7bdd0fb7da87b54920ea9c382/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs#L310-L314
}
Assert.AreEqual (ClientCertificateOption.Manual, h.ClientCertificateOptions, "#15");
}

[Test]
Expand All @@ -103,16 +99,12 @@ public void Properties_Invalid ()
h.MaxAutomaticRedirections = 0;
Assert.Fail ("#1");
} catch (ArgumentOutOfRangeException) {
} catch (TargetInvocationException) {
// See: https://github.com/dotnet/runtime/issues/56089
}

try {
h.MaxRequestContentBufferSize = -1;
Assert.Fail ("#2");
} catch (ArgumentOutOfRangeException) {
} catch (TargetInvocationException) {
// See: https://github.com/dotnet/runtime/issues/56089
}
}

Expand Down

0 comments on commit 1dbb547

Please sign in to comment.