Skip to content

Commit 2258100

Browse files
committed
Merge remote-tracking branch 'upstream/master' into ssh-transport
2 parents 36cae67 + 3ca9743 commit 2258100

Some content is hidden

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

56 files changed

+1930
-1897
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Autodetect text files
2+
* text=auto
3+
4+
# Definitively text files
5+
*.cs text

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ on:
77

88
jobs:
99
build:
10-
1110
runs-on: ubuntu-latest
12-
1311
steps:
14-
- uses: actions/checkout@v1
15-
- name: Setup .NET Core
16-
uses: actions/setup-dotnet@v1
17-
with:
18-
dotnet-version: 3.1.412
19-
- name: Build
20-
run: dotnet build -c Release
21-
- name: Test
22-
run: dotnet test -c Release --no-build
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- name: Setup .NET Core
16+
uses: actions/setup-dotnet@v2
17+
with:
18+
dotnet-version: 6.0.x
19+
- name: Build
20+
run: dotnet build -c Release
21+
- name: Test
22+
run: dotnet test -c Release --no-build

.github/workflows/publish.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
1618
- name: Setup .NET Core
17-
uses: actions/setup-dotnet@v1
19+
uses: actions/setup-dotnet@v2
1820
with:
19-
dotnet-version: 3.1.412
21+
dotnet-version: 6.0.x
2022
- name: Install SignClient tool
2123
run: dotnet tool install --tool-path . SignClient
2224
- name: Install NBGV tool
2325
run: dotnet tool install --tool-path . nbgv
2426
- name: Set Version
2527
run: ./nbgv cloud
26-
- name: Create Packages
28+
- name: Create Packages
2729
run: dotnet pack -c Release -o packages
2830
- name: Sign Packages
2931
run: |
@@ -35,16 +37,15 @@ jobs:
3537
DNF_CODESIGN_USER: ${{secrets.DNF_CODESIGN_USER}}
3638
DNF_CODESIGN_SECRET: ${{secrets.DNF_CODESIGN_SECRET}}
3739
- name: Push packages to NuGet.org
38-
run: |
39-
dotnet nuget push ./packages/Docker.DotNet.*.nupkg --skip-duplicate -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
40+
run: dotnet nuget push ./packages/Docker.DotNet.*.nupkg --skip-duplicate -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
4041
- name: Create Release
4142
uses: actions/github-script@v5
4243
with:
4344
script: |
4445
github.rest.repos.createRelease({
4546
owner: context.repo.owner,
4647
repo: context.repo.repo,
47-
tag_name: context.ref,
48+
tag_name: context.ref,
4849
name: context.ref,
4950
draft: false,
5051
prerelease: false,

Directory.Build.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project>
2+
<!-- Strong-naming -->
3+
<PropertyGroup Label="Signing">
4+
<SignAssembly>true</SignAssembly>
5+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\Key.snk</AssemblyOriginatorKeyFile>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<!-- Defines the StrongNamePublicKeys class with constant which contains the repo identity public key formatted for use in InternalsVisibleTo attributes. -->
9+
<Compile Include="$(MSBuildThisFileDirectory)\StrongNamePublicKeys.cs" Visible="false" />
10+
</ItemGroup>
11+
</Project>

Key.snk

596 Bytes
Binary file not shown.

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ The `CertFile` in the example above should be a .pfx file (PKCS12 format), if yo
200200
//
201201
202202
// You can do this globally for all certificates:
203-
// (Note: This is not available on netstandard1.6)
204203
ServicePointManager.ServerCertificateValidationCallback += (o, c, ch, er) => true;
205204

206205
// Or you can do this on a credential by credential basis:
@@ -248,16 +247,16 @@ Here are typical exceptions thrown from the client library:
248247

249248
## .NET Foundation
250249

251-
Docker.DotNet is a [.NET Foundation](https://www.dotnetfoundation.org/projects) project.
250+
Docker.DotNet is a [.NET Foundation](https://www.dotnetfoundation.org) project.
252251

253252
There are many .NET related projects on GitHub.
254253

255254
- [.NET home repo](https://github.com/Microsoft/dotnet) - links to 100s of .NET projects, from Microsoft and the community.
256-
- [ASP.NET Core home](https://docs.microsoft.com/aspnet/core/?view=aspnetcore-3.1) - the best place to start learning about ASP.NET Core.
255+
- [ASP.NET Core home](https://docs.microsoft.com/aspnet/core) - the best place to start learning about ASP.NET Core.
257256

258257
This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community. For more information, see the [.NET Foundation Code of Conduct](http://www.dotnetfoundation.org/code-of-conduct).
259258

260-
General .NET OSS discussions: [.NET Foundation forums](https://forums.dotnetfoundation.org)
259+
General .NET OSS discussions: [.NET Foundation Discord](https://dotnetfoundation.org/socialize/discord)
261260

262261
## Contributing
263262

StrongNamePublicKeys.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/// <summary>
2+
/// Contains the repo identity public key when strong naming the assembly.
3+
/// </summary>
4+
internal static class StrongNamePublicKeys
5+
{
6+
/// <summary>
7+
/// The public key used for assemblies in this repo (Key.snk).
8+
/// </summary>
9+
public const string DockerDotNetPublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010013a6d952388480a1ce272e8c8ac11d710668c8723e696a421190445a1e6198288112f5e04eb99a626f8bb1454cdf30ebfb0a09cb7fc7b299cb03aa6fea1ae9a58f05f9fb92a85ce82ad4490bb2f0074822d8b0a786684f26a6eb1765f9026dae4857925b4e077d04b6311bec7dacf8e8a031dcc9f7e0384bca914256abee25d9";
10+
}

src/Directory.Build.props

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<Project>
2+
3+
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
4+
25
<PropertyGroup>
36
<IsPackable>true</IsPackable>
4-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
7+
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
58
<PackageIconUrl>https://camo.githubusercontent.com/fa6d5c12609ed8a3ba1163b96f9e9979b8f59b0d/687474703a2f2f7765732e696f2f566663732f636f6e74656e74</PackageIconUrl>
69
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
710
<PackageTags>Docker Container C# .NET</PackageTags>
811
<RepositoryType>git</RepositoryType>
9-
<RepositoryUrl>https://github.com/Microsoft/Docker.DotNet/tree/master/Docker.DotNet</RepositoryUrl>
12+
<RepositoryUrl>https://github.com/dotnet/Docker.DotNet/</RepositoryUrl>
1013
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1114
<IncludeSymbols>true</IncludeSymbols>
1215
<EmbedUntrackedSources>true</EmbedUntrackedSources>
@@ -29,10 +32,10 @@
2932
</ItemGroup>
3033

3134
<ItemGroup>
32-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
33-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37">
35+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
36+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.108">
3437
<PrivateAssets>all</PrivateAssets>
3538
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
3639
</PackageReference>
3740
</ItemGroup>
38-
</Project>
41+
</Project>

src/Docker.DotNet.BasicAuth/BasicAuthCredentials.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using System.Net.Http;
2-
#if !NETSTANDARD1_6
32
using System.Security;
4-
#endif
53

64
namespace Docker.DotNet.BasicAuth
75
{
@@ -17,12 +15,10 @@ public override HttpMessageHandler GetHandler(HttpMessageHandler innerHandler)
1715
return new BasicAuthHandler(_username, _password, innerHandler);
1816
}
1917

20-
#if !NETSTANDARD1_6
2118
public BasicAuthCredentials(SecureString username, SecureString password, bool isTls = false)
2219
: this(new MaybeSecureString(username), new MaybeSecureString(password), isTls)
2320
{
2421
}
25-
#endif
2622

2723
public BasicAuthCredentials(string username, string password, bool isTls = false)
2824
: this(new MaybeSecureString(username), new MaybeSecureString(password), isTls)

src/Docker.DotNet.BasicAuth/MaybeSecureString.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
using System;
2-
#if !NETSTANDARD1_6
32
using System.Security;
43
using System.Runtime.InteropServices;
5-
#endif
64

75
namespace Docker.DotNet.BasicAuth
86
{
97
internal class MaybeSecureString : IDisposable
108
{
11-
#if !NETSTANDARD1_6
12-
139
public SecureString Value { get; }
1410

1511
public MaybeSecureString(string str)
@@ -66,34 +62,5 @@ public override string ToString()
6662
Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString);
6763
}
6864
}
69-
70-
#else
71-
72-
public string Value { get; }
73-
74-
public MaybeSecureString(string str)
75-
{
76-
if (string.IsNullOrEmpty(str))
77-
{
78-
throw new ArgumentNullException(nameof(str));
79-
}
80-
81-
Value = str;
82-
}
83-
84-
public void Dispose()
85-
{
86-
}
87-
88-
public MaybeSecureString Copy()
89-
{
90-
return this;
91-
}
92-
93-
public override string ToString()
94-
{
95-
return Value;
96-
}
97-
#endif
9865
}
9966
}

0 commit comments

Comments
 (0)