-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Import X509 certificate and collections from PEM. #38280
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Start with the temp file route. After everything is happy and stable we can add some things to the testdata package for the verisimilitude of loading a file that existed on disk before the process started. |
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Outdated
Show resolved
Hide resolved
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Outdated
Show resolved
Hide resolved
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Show resolved
Hide resolved
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Show resolved
Hide resolved
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Outdated
Show resolved
Hide resolved
...Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2Collection.cs
Outdated
Show resolved
Hide resolved
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Show resolved
Hide resolved
...Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2Collection.cs
Show resolved
Hide resolved
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.X509Certificates/tests/PemTestData.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs
Show resolved
Hide resolved
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
...raphy.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.X509Certificates/tests/X509Certificate2PemTests.cs
Show resolved
Hide resolved
Is there any practical benefit of doing this now if we can write temp files? My recollection from .NET Core 1.0 on Jenkins was that writing to disk was not a good idea because test interruptions would leave data behind and the environment was not ephemeral. If that's no longer true then I don't see much of a value add from adding files to the test data package. |
Not really. Mostly aesthetic or a "feel good" scenario completion feeling. I think the current model is fine, though. |
Fixes #31944
This does not have unit tests that exercise theI'm not sure of the best way to do it. Write the file out to a temp location? Or should I add a bunch of files to*File
import methods. While I'd like those tested,runtime-assets
package and open a PR there? Is there documentation about validating that it works locally?