Repository navigation
Fix sonar issues - #703
Open
MykolaSuperman wants to merge 26 commits into
Open
Fix sonar issues#703MykolaSuperman wants to merge 26 commits into
MykolaSuperman wants to merge 26 commits into
Conversation
added 26 commits
November 23, 2026 12:55
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
…ctions Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
GetX509CertExtensions stopped iterating over the certificate extensions as soon as both the subject key identifier and the authority key identifier were parsed. An issuer alternative name extension located after them was never parsed, so mIssuerURLs stayed empty and no error was reported. As a result, the service discovery URL from the certificate was silently ignored and a fallback one was used instead. The order of extensions is not defined by the standard and depends on the certificate issuer, so the result depended on how the certificate was generated. The OpenSSL provider is not affected. Parse all extensions regardless of their order and add a test with the issuer alternative name placed after the key identifiers. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
The subject and authority key identifiers were copied to the certificate with memcpy while the result of Resize was ignored. If a key identifier in a certificate was longer than cCertKeyIdSize (24 bytes), Resize failed, but memcpy still copied the whole identifier and wrote past the end of the array. For example, a key identifier based on SHA-256 has 32 bytes. Return the Resize error instead, the same way the OpenSSL provider does, and add a test with long subject and authority key identifiers. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Certificate extension OIDs were compared with memcmp using the OID length read from the certificate, without checking that it equals the length of the expected OID. An extension with a longer OID starting with the same bytes followed by a zero byte, e.g. 2.5.29.14.0, was handled as the subject key identifier and overwrote the real one. A zero length OID matched every extension, and for a longer OID memcmp read past the end of the OID literal. Compare the OID length before comparing the bytes and add a test with an unknown extension, which OID starts with the subject key identifier OID. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
MykolaSuperman
force-pushed
the
fix_sonar_issues
branch
from
November 23, 2026 11:43
1624402 to
0512b8e
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.