OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.97k stars 950 forks source link

Limit certificates in rejected store to a constant value (currently 5) #2693

Closed mrsuciu closed 2 months ago

mrsuciu commented 3 months ago

Proposed changes

The Rejected store currently keeps all the rejected certificates. This PR proposes that the Rejected store should keep only a limited value of the 5 last rejected certificates. It also eliminates the redundant check for existing certificates in the X509CertificateStore and DirectoryCertificateStore.

Related Issues

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply. You can also fill these out after creating the PR.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 76.31579% with 9 lines in your changes missing coverage. Please review.

Project coverage is 54.53%. Comparing base (2aec785) to head (c967726). Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
...Core/Security/Certificates/CertificateValidator.cs 72.41% 5 Missing and 3 partials :warning:
...cates/X509CertificateStore/X509CertificateStore.cs 87.50% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2693 +/- ## ========================================== - Coverage 54.66% 54.53% -0.13% ========================================== Files 347 347 Lines 65578 65602 +24 Branches 13442 13449 +7 ========================================== - Hits 35846 35777 -69 - Misses 25819 25898 +79 - Partials 3913 3927 +14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mregen commented 3 months ago

I suggest to use #2720 instead, less complicated...