Skip to content

Commit 0d93719

Browse files
authored
Merge branch 'develop' into auth-gssapi
2 parents 6017449 + 8712c99 commit 0d93719

File tree

432 files changed

+4791
-8751
lines changed

Some content is hidden

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

432 files changed

+4791
-8751
lines changed

.editorconfig

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ dotnet_diagnostic.S2699.severity = none
177177
# S2930: "IDisposables" should be disposed
178178
# https://rules.sonarsource.com/csharp/RSPEC-2930/
179179
#
180-
# Duplicate of CA2000.
180+
# too noisy.
181181
dotnet_diagnostic.S2930.severity = none
182182

183183
# S2933: Fields that are only assigned in the constructor should be "readonly"
@@ -344,6 +344,10 @@ dotnet_diagnostic.S5659.severity = none
344344
# https://rules.sonarsource.com/csharp/RSPEC-5773/
345345
dotnet_diagnostic.S4581.severity = none
346346

347+
# S6966: Awaitable method should be used
348+
# Duplicate of CA1849
349+
dotnet_diagnostic.S6966.severity = none
350+
347351
#### StyleCop rules ####
348352

349353
# SA1003: Symbols must be spaced correctly
@@ -683,6 +687,10 @@ dotnet_diagnostic.CA1305.severity = none
683687
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1309
684688
dotnet_diagnostic.CA1309.severity = none
685689

690+
# CA1508: Avoid dead conditional code
691+
# Too many false positives.
692+
dotnet_diagnostic.CA1508.severity = none
693+
686694
# CA1510: Use ArgumentNullException throw helper
687695
#
688696
# This is only available in .NET 6.0 and higher. We'd need to use conditional compilation to only
@@ -726,6 +734,14 @@ dotnet_diagnostic.CA1848.severity = silent
726734
# By default, this diagnostic is only reported for private members.
727735
dotnet_code_quality.CA1859.api_surface = private,internal
728736

737+
# CA1873: Evaluation of this argument may be expensive and unnecessary if logging is disabled
738+
dotnet_diagnostic.CA1873.severity = suggestion
739+
740+
# CA2000: Dispose objects before losing scope
741+
#
742+
# too noisy.
743+
dotnet_diagnostic.CA2000.severity = suggestion
744+
729745
# CA2208: Instantiate argument exceptions correctly
730746
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2208
731747
#

.github/workflows/build.yml

Lines changed: 96 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,45 @@ jobs:
1010
runs-on: ubuntu-24.04
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0 # needed for Nerdbank.GitVersioning
1616

1717
- name: Setup .NET
18-
uses: actions/setup-dotnet@v4
18+
uses: actions/setup-dotnet@v5
1919

2020
- name: Build Unit Tests .NET
21-
run: dotnet build -f net9.0 test/Renci.SshNet.Tests/
21+
run: dotnet build -f net10.0 test/Renci.SshNet.Tests/
2222

2323
- name: Build IntegrationTests .NET
24-
run: dotnet build -f net9.0 test/Renci.SshNet.IntegrationTests/
24+
run: dotnet build -f net10.0 test/Renci.SshNet.IntegrationTests/
2525

2626
- name: Run Unit Tests .NET
2727
run: |
2828
dotnet test \
29-
-f net9.0 \
29+
-f net10.0 \
3030
--no-build \
3131
--logger "console;verbosity=normal" \
3232
--logger GitHubActions \
3333
-p:CollectCoverage=true \
3434
-p:CoverletOutputFormat=cobertura \
35-
-p:CoverletOutput=../../coverlet/linux_unit_test_net_9_coverage.xml \
35+
-p:CoverletOutput=../../coverlet/linux_unit_test_net_10_coverage.xml \
3636
test/Renci.SshNet.Tests/
3737
3838
- name: Run Integration Tests .NET
3939
run: |
4040
dotnet test \
41-
-f net9.0 \
41+
-f net10.0 \
4242
--no-build \
4343
--logger "console;verbosity=normal" \
4444
--logger GitHubActions \
4545
-p:CollectCoverage=true \
4646
-p:CoverletOutputFormat=cobertura \
47-
-p:CoverletOutput=../../coverlet/linux_integration_test_net_9_coverage.xml \
47+
-p:CoverletOutput=../../coverlet/linux_integration_test_net_10_coverage.xml \
4848
test/Renci.SshNet.IntegrationTests/
4949
5050
- name: Archive Coverlet Results
51-
uses: actions/upload-artifact@v4
51+
uses: actions/upload-artifact@v5
5252
with:
5353
name: Coverlet Results Linux
5454
path: coverlet
@@ -57,12 +57,12 @@ jobs:
5757
runs-on: windows-2025
5858
steps:
5959
- name: Checkout
60-
uses: actions/checkout@v4
60+
uses: actions/checkout@v5
6161
with:
6262
fetch-depth: 0 # needed for Nerdbank.GitVersioning
6363

6464
- name: Setup .NET
65-
uses: actions/setup-dotnet@v4
65+
uses: actions/setup-dotnet@v5
6666

6767
- name: Build Solution
6868
run: dotnet build Renci.SshNet.sln
@@ -74,21 +74,21 @@ jobs:
7474
run: dotnet pack
7575

7676
- name: Archive NuGet Package
77-
uses: actions/upload-artifact@v4
77+
uses: actions/upload-artifact@v5
7878
with:
7979
name: NuGet Package
8080
path: src/Renci.SshNet/bin/Release/*.*nupkg
8181

8282
- name: Run Unit Tests .NET
8383
run: |
8484
dotnet test `
85-
-f net9.0 `
85+
-f net10.0 `
8686
--no-build `
8787
--logger "console;verbosity=normal" `
8888
--logger GitHubActions `
8989
-p:CollectCoverage=true `
9090
-p:CoverletOutputFormat=cobertura `
91-
-p:CoverletOutput=../../coverlet/windows_unit_test_net_9_coverage.xml `
91+
-p:CoverletOutput=../../coverlet/windows_unit_test_net_10_coverage.xml `
9292
test/Renci.SshNet.Tests/
9393
9494
- name: Run Unit Tests .NET Framework
@@ -103,17 +103,17 @@ jobs:
103103
-p:CoverletOutput=../../coverlet/windows_unit_test_net_4_6_2_coverage.xml `
104104
test/Renci.SshNet.Tests/
105105
106-
Windows-Integration-Tests:
107-
name: Windows Integration Tests
106+
Windows-Integration-Tests-NetFramework:
107+
name: Windows Integration Tests .NET Framework
108108
runs-on: windows-2025
109109
steps:
110110
- name: Checkout
111-
uses: actions/checkout@v4
111+
uses: actions/checkout@v5
112112
with:
113113
fetch-depth: 0 # needed for Nerdbank.GitVersioning
114114

115115
- name: Setup .NET
116-
uses: actions/setup-dotnet@v4
116+
uses: actions/setup-dotnet@v5
117117

118118
- name: Setup WSL2
119119
uses: Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
@@ -140,22 +140,67 @@ jobs:
140140
test\Renci.SshNet.IntegrationTests\
141141

142142
- name: Archive Coverlet Results
143-
uses: actions/upload-artifact@v4
143+
uses: actions/upload-artifact@v5
144144
with:
145-
name: Coverlet Results Windows
145+
name: Coverlet Results Windows .NET Framework
146146
path: coverlet
147147

148-
Publish:
148+
Windows-Integration-Tests-Net:
149+
name: Windows Integration Tests .NET
150+
runs-on: windows-2025
151+
steps:
152+
- name: Checkout
153+
uses: actions/checkout@v5
154+
with:
155+
fetch-depth: 0 # needed for Nerdbank.GitVersioning
156+
157+
- name: Setup .NET
158+
uses: actions/setup-dotnet@v5
159+
160+
- name: Setup WSL2
161+
uses: Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
162+
with:
163+
distribution: Ubuntu-24.04
164+
165+
- name: Setup SSH Server
166+
shell: wsl-bash {0}
167+
run: |
168+
apt-get update && apt-get upgrade -y
169+
apt-get install -y podman
170+
podman build -t renci-ssh-tests-server-image -f test/Renci.SshNet.IntegrationTests/Dockerfile test/Renci.SshNet.IntegrationTests/
171+
podman run --rm -h renci-ssh-tests-server -d -p 2222:22 renci-ssh-tests-server-image
172+
173+
- name: Run Integration Tests .NET
174+
run:
175+
dotnet test `
176+
-f net10.0 `
177+
--logger "console;verbosity=normal" `
178+
--logger GitHubActions `
179+
-p:CollectCoverage=true `
180+
-p:CoverletOutputFormat=cobertura `
181+
-p:CoverletOutput=..\..\coverlet\windows_integration_test_net_9_coverage.xml `
182+
test\Renci.SshNet.IntegrationTests\
183+
184+
- name: Archive Coverlet Results
185+
uses: actions/upload-artifact@v5
186+
with:
187+
name: Coverlet Results Windows .NET
188+
path: coverlet
189+
190+
Publish-GitHub-Package:
191+
name: Publish GitHub Package
149192
runs-on: ubuntu-24.04
150193
if: github.ref == 'refs/heads/develop'
151194
permissions:
152195
packages: write
153196
needs:
154197
- Windows
155198
- Linux
199+
- Windows-Integration-Tests-NetFramework
200+
- Windows-Integration-Tests-Net
156201
steps:
157202
- name: Download NuGet Package
158-
uses: actions/download-artifact@v4
203+
uses: actions/download-artifact@v6
159204
with:
160205
name: NuGet Package
161206

@@ -170,3 +215,32 @@ jobs:
170215
dotnet nuget push "*.nupkg" \
171216
--source github \
172217
--api-key ${{ secrets.GITHUB_TOKEN }}
218+
219+
Publish-NuGet-Package:
220+
name: Publish NuGet Package
221+
runs-on: ubuntu-24.04
222+
if: startsWith(github.event.ref, 'refs/tags/20')
223+
permissions:
224+
id-token: write
225+
needs:
226+
- Windows
227+
- Linux
228+
- Windows-Integration-Tests-NetFramework
229+
- Windows-Integration-Tests-Net
230+
steps:
231+
- name: Download NuGet Package
232+
uses: actions/download-artifact@v6
233+
with:
234+
name: NuGet Package
235+
236+
- name: NuGet login (OIDC → temp API key)
237+
uses: NuGet/login@v1
238+
id: login
239+
with:
240+
user: ${{ secrets.NUGET_USER }}
241+
242+
- name: Publish to NuGet Registry
243+
run: |
244+
dotnet nuget push "*.nupkg" \
245+
--source https://api.nuget.org/v3/index.json \
246+
--api-key ${{ steps.login.outputs.NUGET_API_KEY }}

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626

2727
- name: Setup Pages
2828
uses: actions/configure-pages@v5
2929

3030
- name: Setup .NET
31-
uses: actions/setup-dotnet@v4
31+
uses: actions/setup-dotnet@v5
3232

3333
- name: Setup docfx
3434
run: dotnet tool update -g docfx
@@ -37,7 +37,7 @@ jobs:
3737
run: docfx ./docfx/docfx.json
3838

3939
- name: Upload documentation
40-
uses: actions/upload-pages-artifact@v3
40+
uses: actions/upload-pages-artifact@v4
4141
with:
4242
path: './docfx/_site'
4343

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
-->
2424
<PropertyGroup>
2525
<EnableNETAnalyzers>true</EnableNETAnalyzers>
26-
<AnalysisLevel>preview-All</AnalysisLevel>
2726
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
2827
</PropertyGroup>
2928

Directory.Packages.props

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@
44
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageVersion Include="BenchmarkDotNet" Version="0.15.2" />
7+
<PackageVersion Include="BenchmarkDotNet" Version="0.15.3" />
88
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
99
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
1010
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
1111
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
12-
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.210" />
12+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.220" />
1313
<!-- Should stay on LTS .NET releases. -->
14+
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="10.0.0" />
1415
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
15-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.7" />
16-
<PackageVersion Include="MSTest" Version="3.10.0" />
16+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.0" />
17+
<PackageVersion Include="MSTest" Version="4.0.2" />
1718
<PackageVersion Include="Moq" Version="4.20.72" />
1819
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
1920
<PackageVersion Include="PolySharp" Version="1.15.0" />
2021
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.15.0.120848" />
2122
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
2223
<!-- Should stay on LTS .NET releases. -->
2324
<PackageVersion Include="System.Formats.Asn1" Version="8.0.2" />
24-
<PackageVersion Include="Testcontainers" Version="4.6.0" />
25+
<PackageVersion Include="Testcontainers" Version="4.7.0" />
2526
</ItemGroup>
26-
</Project>
27+
</Project>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.300",
3+
"version": "10.0.100",
44
"rollForward": "latestFeature"
55
}
66
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#nullable enable
2+
#if !NET
3+
using System.Text;
4+
#endif
5+
6+
namespace System
7+
{
8+
internal static class ConvertExtensions
9+
{
10+
extension(Convert)
11+
{
12+
#if !NET
13+
public static byte[] FromHexString(string s)
14+
{
15+
return Org.BouncyCastle.Utilities.Encoders.Hex.Decode(s);
16+
}
17+
18+
public static string ToHexString(byte[] inArray)
19+
{
20+
ArgumentNullException.ThrowIfNull(inArray);
21+
22+
var builder = new StringBuilder(inArray.Length * 2);
23+
24+
foreach (var b in inArray)
25+
{
26+
builder.Append(b.ToString("X2"));
27+
}
28+
29+
return builder.ToString();
30+
}
31+
#endif
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)