Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use built-in PEM certificate import on .NET 6 and onwards #1139

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Mar 10, 2024

What does this PR do?

This pull requests uses the built-in PEM certificate import on .NET 6 onwards and updates the package references conditionally on the target framework.

BouncyCastle.Cryptography, Microsoft.Bcl.AsyncInterfaces and System.Text.Json are now referenced only when targeting .NET Standard (2.0 and 2.1) since they are not needed anymore when targeting .NET 6 onwards.

Why is it important?

This allows to drop the BouncyCastle.Cryptography dependency (almost 7 MB) when targeting net6.0 and net8.0.

Related issues

None, I just saw that .NET 6 and .NET 8 support was added recently and took the opportunity to reduce the dependencies.

How to test this PR

Just run the existing tests and verify that nothing is broken. Note that some care had to be taken on Windows.

This allows to drop the BouncyCastle.Cryptography dependency (almost 7 MB) when targeting net6.0 and net8.0.

Additionnally, the `Microsoft.Bcl.AsyncInterfaces` and `System.Text.Json` dependencies are also dropped when targeting .NET 6 and later.
Copy link

netlify bot commented Mar 10, 2024

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit c29f89f
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/65ef3a681556e90008c1d0f6
😎 Deploy Preview https://deploy-preview-1139--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HofmeisterAn HofmeisterAn changed the base branch from develop to main March 11, 2024 17:08
@HofmeisterAn HofmeisterAn changed the base branch from main to develop March 11, 2024 17:08
@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Mar 11, 2024
@HofmeisterAn HofmeisterAn changed the title Use built-in PEM certificate import on .NET 6 onwards feat: Use built-in PEM certificate import on .NET 6 and onwards Mar 11, 2024
@HofmeisterAn HofmeisterAn merged commit 6e6ccb5 into testcontainers:develop Mar 11, 2024
11 checks passed
@0xced 0xced deleted the Conditional-BouncyCastle branch March 11, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants