Skip to content

Commit 6049eaa

Browse files
authored
Merge branch 'develop' into bcl-ciphermode
2 parents faa0b00 + 86dc811 commit 6049eaa

File tree

107 files changed

+388
-735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+388
-735
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,17 @@ MA0053.class_with_virtual_member_shoud_be_sealed = true
610610
# This rule is disabled by default, hence we need to explicitly enable it.
611611
dotnet_diagnostic.MA0112.severity = error
612612

613+
# MA0165: Make interpolated string
614+
dotnet_diagnostic.MA0165.severity = none
615+
616+
#### MSTest rules ####
617+
618+
# MSTEST0015: Test method should not be ignored
619+
dotnet_diagnostic.MSTEST0015.severity = suggestion
620+
621+
# MSTEST0032: Assertion condition is always true
622+
dotnet_diagnostic.MSTEST0032.severity = suggestion
623+
613624
#### .NET Compiler Platform code quality rules ####
614625

615626
# CA1002: Do not expose generic lists

.github/dependabot.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,26 @@ updates:
88
- package-ecosystem: "docker"
99
directory: "/test/Renci.SshNet.IntegrationTests/"
1010
schedule:
11-
interval: "weekly"
11+
interval: "monthly"
12+
13+
- package-ecosystem: "nuget"
14+
directory: "/"
15+
schedule:
16+
interval: "monthly"
17+
ignore: # See justifications in Directory.Packages.props
18+
- dependency-name: "Microsoft.Bcl.AsyncInterfaces"
19+
20+
- dependency-name: "System.Formats.Asn1"
21+
update-types: ["version-update:semver-major"]
22+
23+
- dependency-name: "Microsoft.Extensions.Logging.Abstractions"
24+
update-types: ["version-update:semver-major"]
25+
groups:
26+
dependencies:
27+
patterns:
28+
- "*"
29+
30+
- package-ecosystem: "github-actions"
31+
directory: "/"
32+
schedule:
33+
interval: "monthly"

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v4
2626

2727
- name: Setup Pages
28-
uses: actions/configure-pages@v4
28+
uses: actions/configure-pages@v5
2929

3030
- name: Setup .NET 8.0
3131
uses: actions/setup-dotnet@v4

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<!--
3232
Disable nullable warnings on old frameworks because of missing annotations.
3333
-->
34-
<PropertyGroup Condition=" !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0')) ">
34+
<PropertyGroup Condition=" !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) ">
3535
<NoWarn>$(NoWarn);CS8602;CS8604;CS8777</NoWarn>
3636
</PropertyGroup>
3737

Directory.Packages.props

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,31 @@
66
<ItemGroup>
77
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
88
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.5.0" />
9-
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
10-
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
9+
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
10+
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
1111
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1">
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
<PrivateAssets>all</PrivateAssets>
1414
</PackageVersion>
15-
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.163" />
16-
<!-- Must be kept at version 1.0.0 or higher, see https://github.com/sshnet/SSH.NET/pull/1288 for details. -->
15+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.186" />
16+
17+
<!-- Must be kept at version 1.0.0, see https://github.com/sshnet/SSH.NET/pull/1288 for details. -->
1718
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" />
18-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
19+
20+
<!-- No reason to require later than 6.0.0 at this time. -->
1921
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
20-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
21-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
22-
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.2" />
23-
<PackageVersion Include="MSTest.TestFramework" Version="3.6.2" />
22+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.1" />
23+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
24+
<PackageVersion Include="MSTest.TestAdapter" Version="3.7.3" />
25+
<PackageVersion Include="MSTest.TestFramework" Version="3.7.3" />
2426
<PackageVersion Include="Moq" Version="4.20.72" />
25-
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.77-alpha" /> <!-- can use stable once 3.7 is released -->
26-
<PackageVersion Include="PolySharp" Version="1.14.1" />
27-
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
27+
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
28+
<PackageVersion Include="PolySharp" Version="1.15.0" />
29+
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.6.0.109712" />
2830
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
31+
32+
<!-- Should stay on LTS .NET releases. -->
2933
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />
30-
<PackageVersion Include="Testcontainers" Version="4.0.0" />
34+
<PackageVersion Include="Testcontainers" Version="4.1.0" />
3135
</ItemGroup>
3236
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Private keys in PuTTY private key format can be encrypted using the following ci
181181
**SSH.NET** supports the following target frameworks:
182182
* .NETFramework 4.6.2 (and higher)
183183
* .NET Standard 2.0 and 2.1
184-
* .NET 6 (and higher)
184+
* .NET 8 (and higher)
185185

186186
## Building the library
187187

Renci.SshNet.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ EndProject
8383
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Renci.SshNet.AotCompatibilityTestApp", "test\Renci.SshNet.AotCompatibilityTestApp\Renci.SshNet.AotCompatibilityTestApp.csproj", "{F2E3FC50-4EF4-488C-B3D2-C45E99898D8B}"
8484
EndProject
8585
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{05229079-6738-42CE-8F73-F4E182929B03}"
86+
ProjectSection(SolutionItems) = preProject
87+
.github\dependabot.yml = .github\dependabot.yml
88+
EndProjectSection
8689
EndProject
8790
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{95F25B1A-2B14-4745-9087-43C00CD90EE0}"
8891
ProjectSection(SolutionItems) = preProject

docfx/logging.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ Logging
44
SSH.NET uses the [Microsoft.Extensions.Logging](https://learn.microsoft.com/dotnet/core/extensions/logging) API to log diagnostic messages. In order to access the log messages of SSH.NET in your own application for diagnosis, register your own `ILoggerFactory` before using the SSH.NET APIs, for example:
55

66
```cs
7+
using Microsoft.Extensions.Logging;
8+
79
ILoggerFactory loggerFactory = LoggerFactory.Create(builder =>
810
{
911
builder.SetMinimumLevel(LogLevel.Debug);
1012
builder.AddConsole();
1113
});
1214

1315
Renci.SshNet.SshNetLoggingConfiguration.InitializeLogging(loggerFactory);
16+
```
1417

1518
All messages by SSH.NET are logged under the `Renci.SshNet` category.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1+
#if !NET
12
using System.Threading;
23
using System.Threading.Tasks;
34

45
namespace Renci.SshNet.Abstractions
56
{
67
internal static class CancellationTokenSourceExtensions
78
{
8-
#if !NET8_OR_GREATER
99
public static Task CancelAsync(this CancellationTokenSource cancellationTokenSource)
1010
{
1111
cancellationTokenSource.Cancel();
1212
return Task.CompletedTask;
1313
}
14-
#endif
1514
}
1615
}
16+
#endif

src/Renci.SshNet/Abstractions/SocketAbstraction.Async.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NET6_0_OR_GREATER
1+
#if NET
22

33
using System;
44
using System.Diagnostics;
@@ -47,4 +47,4 @@ static async ValueTask SendAsyncCore(Socket socket, ReadOnlyMemory<byte> data, C
4747
}
4848
}
4949
}
50-
#endif // NET6_0_OR_GREATER
50+
#endif // NET

0 commit comments

Comments
 (0)