Skip to content

Conversation

@ddubuc
Copy link
Contributor

@ddubuc ddubuc commented Oct 26, 2022

  • Works with net 6.0
  • Check if works with client 4.7.2 with no TLS
  • Check if works with client 4.7.2 with TLS
  • Check if works with client 4.7.2 with mTLS

innerHttpClientHandler.ClientCertificates.Add(tmpCert);
innerHttpClientHandler.ClientCertificateOption = ClientCertificateOption.Manual;
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
innerHttpClientHandler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;

Check failure

Code scanning / SonarCloud

Weak SSL/TLS protocols should not be used

<!--SONAR_ISSUE_KEY:AYP_-Ra60cK-COPGhfFf-->Change this code to use a stronger protocol. <p>See more on <a href="https://sonarcloud.io/project/issues?id=aneoconsulting_ArmoniK.Extensions.Csharp&issues=AYP_-Ra60cK-COPGhfFf&open=AYP_-Ra60cK-COPGhfFf&branch=ddu%2FnetStandard">SonarCloud</a></p>
innerHttpClientHandler.ClientCertificates.Add(tmpCert);
innerHttpClientHandler.ClientCertificateOption = ClientCertificateOption.Manual;
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
innerHttpClientHandler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;

Check failure

Code scanning / SonarCloud

Weak SSL/TLS protocols should not be used

<!--SONAR_ISSUE_KEY:AYP_-Ra60cK-COPGhfFe-->Change this code to use a stronger protocol. <p>See more on <a href="https://sonarcloud.io/project/issues?id=aneoconsulting_ArmoniK.Extensions.Csharp&issues=AYP_-Ra60cK-COPGhfFe&open=AYP_-Ra60cK-COPGhfFe&branch=ddu%2FnetStandard">SonarCloud</a></p>
cert.Dispose();
innerHttpClientHandler.ClientCertificates.Add(tmpCert);
innerHttpClientHandler.ClientCertificateOption = ClientCertificateOption.Manual;
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

Check failure

Code scanning / SonarCloud

Weak SSL/TLS protocols should not be used

<!--SONAR_ISSUE_KEY:AYP_-Ra60cK-COPGhfFd-->Change this code to use a stronger protocol. <p>See more on <a href="https://sonarcloud.io/project/issues?id=aneoconsulting_ArmoniK.Extensions.Csharp&issues=AYP_-Ra60cK-COPGhfFd&open=AYP_-Ra60cK-COPGhfFd&branch=ddu%2FnetStandard">SonarCloud</a></p>
cert.Dispose();
innerHttpClientHandler.ClientCertificates.Add(tmpCert);
innerHttpClientHandler.ClientCertificateOption = ClientCertificateOption.Manual;
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

Check failure

Code scanning / SonarCloud

Weak SSL/TLS protocols should not be used

<!--SONAR_ISSUE_KEY:AYP_-Ra60cK-COPGhfFc-->Change this code to use a stronger protocol. <p>See more on <a href="https://sonarcloud.io/project/issues?id=aneoconsulting_ArmoniK.Extensions.Csharp&issues=AYP_-Ra60cK-COPGhfFc&open=AYP_-Ra60cK-COPGhfFc&branch=ddu%2FnetStandard">SonarCloud</a></p>

if (!sslValidation)
{
innerHttpClientHandler.ServerCertificateValidationCallback += (httpRequestMessage,

Check failure

Code scanning / SonarCloud

Server certificates should be verified during SSL/TLS connections

<!--SONAR_ISSUE_KEY:AYP_-Ra60cK-COPGhfFb-->Enable server certificate validation on this SSL/TLS connection <p>See more on <a href="https://sonarcloud.io/project/issues?id=aneoconsulting_ArmoniK.Extensions.Csharp&issues=AYP_-Ra60cK-COPGhfFb&open=AYP_-Ra60cK-COPGhfFb&branch=ddu%2FnetStandard">SonarCloud</a></p>
@lemaitre-aneo lemaitre-aneo changed the base branch from main to next October 27, 2022 08:16
@lemaitre-aneo lemaitre-aneo changed the base branch from next to main December 13, 2022 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants