Skip to content

Commit cebfcd9

Browse files
authored
Update SslProtocols to include 1.3 (#321)
1 parent ceab550 commit cebfcd9

File tree

4 files changed

+37
-20
lines changed

4 files changed

+37
-20
lines changed

nanoFramework.System.Net/Properties/AssemblyInfo.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
using System.Reflection;
1+
//
2+
// Copyright (c) .NET Foundation and Contributors
3+
// See LICENSE file in the project root for full license information.
4+
//
5+
6+
using System.Reflection;
27
using System.Runtime.InteropServices;
38

49
// General Information about an assembly is controlled through the following
@@ -11,7 +16,7 @@
1116

1217
////////////////////////////////////////////////////////////////
1318
// update this whenever the native assembly signature changes //
14-
[assembly: AssemblyNativeVersion("100.2.0.1")]
19+
[assembly: AssemblyNativeVersion("100.2.0.11")]
1520
////////////////////////////////////////////////////////////////
1621

1722
// Setting ComVisible to false makes the types in this assembly not visible

nanoFramework.System.Net/Security/NetworkSecurity.cs

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,51 @@
1010
namespace System.Net.Security
1111
{
1212
/// <summary>
13-
/// Defines the possible versions of Secure Sockets Layer (SSL).
13+
/// Defines the possible versions of <see cref="SslProtocols"/>. This enumeration supports a bitwise combination of its member values.
1414
/// </summary>
1515
/// <remarks>
16-
/// Note: Following the recommendation of the .NET documentation, nanoFramework implementation does not have SSL3 nor Default because those are deprecated and unsecure.
16+
/// <para>
17+
/// During the handshake, the client sends a list of SSL versions and the server chooses the best matching version from that list.
18+
/// </para>
19+
/// <para>
20+
/// Note: Following the full .NET implementation, .NET nanoFramework does not have any of the SSL nor Default because those are deprecated and unsecure.
21+
/// </para>
1722
/// </remarks>
18-
[FlagsAttribute]
23+
[Flags]
1924
public enum SslProtocols
2025
{
2126
/// <summary>
22-
/// Allows the operating system to choose the best protocol to use, and to block protocols that are not secure. Unless your app has a specific reason not to, you should use this field.
27+
/// Allows the operating system to choose the best protocol to use, and to block protocols that are not secure. Unless your app has a specific reason not to, you should use this value.
2328
/// </summary>
2429
None = 0x00,
2530

2631
/// <summary>
27-
/// Specifies the TLS 1.0 security protocol.
28-
/// The TLS protocol is defined in IETF RFC 2246.
32+
/// Specifies the TLS 1.0 security protocol. TLS 1.0 is provided for backward compatibility only. The TLS protocol is defined in IETF RFC 2246. This member is obsolete and will be removed in a future version.
2933
/// </summary>
30-
Tls = 0x10,
34+
/// <remarks>
35+
/// If the underlying platform does not support TLS 1.0, the connection attempt will use the minimum version supported instead.
36+
/// </remarks>
37+
[Obsolete("This value is obsolete and unsecured and will be removed in a future version.")]
38+
Tls = 192,
3139

3240
/// <summary>
33-
/// Specifies the TLS 1.1 security protocol.
34-
/// The TLS protocol is defined in IETF RFC 4346.
41+
/// Specifies the TLS 1.1 security protocol. The TLS protocol is defined in IETF RFC 4346. This member is obsolete and will be removed in a future version.
3542
/// </summary>
36-
Tls11 = 0x20,
43+
/// <remarks>
44+
/// If the underlying platform does not support TLS 1.1, the connection attempt will use the minimum version supported instead.
45+
/// </remarks>
46+
[Obsolete("This value is obsolete and unsecured and will be removed in a future version.")]
47+
Tls11 = 768,
3748

3849
/// <summary>
39-
/// Specifies the TLS 1.2 security protocol.
40-
/// The TLS protocol is defined in IETF RFC 5246.
50+
/// Specifies the TLS 1.2 security protocol. The TLS protocol is defined in IETF RFC 5246.
4151
/// </summary>
42-
Tls12 = 0x40,
52+
Tls12 = 3072,
53+
54+
/// <summary>
55+
/// Specifies the TLS 1.3 security protocol. The TLS protocol is defined in IETF RFC 8446.
56+
/// </summary>
57+
Tls13 = 12288,
4358
}
4459

4560
/// <summary>

nanoFramework.System.Net/System.Net.nfproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@
4949
<NFMDP_PE_ExcludeClassByName Include="PhyProtocols">
5050
<InProject>false</InProject>
5151
</NFMDP_PE_ExcludeClassByName>
52-
<NFMDP_PE_ExcludeClassByName Include="SslProtocols">
53-
<InProject>false</InProject>
54-
</NFMDP_PE_ExcludeClassByName>
5552
<NFMDP_PE_ExcludeClassByName Include="SslVerification">
5653
<InProject>false</InProject>
5754
</NFMDP_PE_ExcludeClassByName>
@@ -163,4 +160,4 @@
163160
<Error Condition="!Exists('..\packages\Nerdbank.GitVersioning.3.6.139\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Nerdbank.GitVersioning.3.6.139\build\Nerdbank.GitVersioning.targets'))" />
164161
</Target>
165162
<Import Project="..\packages\Nerdbank.GitVersioning.3.6.139\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\packages\Nerdbank.GitVersioning.3.6.139\build\Nerdbank.GitVersioning.targets')" />
166-
</Project>
163+
</Project>

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "1.10",
3+
"version": "1.11",
44
"assemblyVersion": {
55
"precision": "build"
66
},

0 commit comments

Comments
 (0)