Disable TLS certificate validation when disableTLSCertificateValidation is set in the config file for a source.#5514
Conversation
kartheekp-ms
left a comment
There was a problem hiding this comment.
IMHO, we need to improve the test coverage for this change. For example, we should ensure that the restore succeeds when disableTLSCertificateValidate is set to true, and the mock server implementation includes a self-signed certificate in the chain. I am not an expert on what constitutes good test coverage for this change. Perhaps I am overcomplicating the issue regarding test coverage.
|
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
|
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
|
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
|
Team Triage: Please consider adding some dotnet integration tests https://github.com/NuGet/NuGet.Client/blob/dev/test/TestUtilities/Test.Utility/FileSystemBackedV3MockServer.cs |
|
@kartheekp-ms @zivkan , I added some integration tests that are focused on dotnet restore. |
| public TcpListenerServer() | ||
| { } | ||
|
|
||
| private static X509Certificate2 GenerateSelfSignedCertificate() |
There was a problem hiding this comment.
GenerateSelfSignedCertificate method has same logic in this class and also SelfSignedCertificateMockServer. If possible, please consider removing the code duplication in a follow-up PR.
2baabcf
into
dev-feature-disable-TLS-certificate-verification
Bug
Fixes: NuGet/Home#13023
Regression? Last working version:
Description
Disable TLS certificate validation for the HTTP client handler when
disableTLSCertificateValidationis set in the config file.PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation