Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

RSA Algo unit-test (DEV) #3821

Merged
merged 10 commits into from
Jul 28, 2021
Merged

RSA Algo unit-test (DEV) #3821

merged 10 commits into from
Jul 28, 2021

Conversation

@mtwalli mtwalli added the maintainers Tag pull requests created by maintainers label Jul 28, 2021
@mtwalli mtwalli added this to the 2.7.0 milestone Jul 28, 2021
@mtwalli mtwalli requested a review from a team July 28, 2021 06:51
@marcauberer marcauberer changed the title RAS Algo unit-test (DEV) RSA Algo unit-test (DEV) Jul 28, 2021
@axelherbstreith axelherbstreith self-assigned this Jul 28, 2021
@@ -44,6 +46,9 @@ class DscSignatureValidatorTest : BaseTest() {
every { dscRepository.dscData } returns flowOf(dscData)
every { securityProvider.setup() } just Runs

// Add RSA algorithm in unit tests context.
Security.addProvider(BouncyCastleProvider())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to removed again?

Copy link
Contributor Author

@mtwalli mtwalli Jul 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it will stay. SecurityProvider.setup() should NOT be mocked ,but the crypto stuff from org.conscrypt.* is not available for unit testing. we could use an openJDK implementation ,but it is not really worth it for one unit test, more information here. google/conscrypt#649

Copy link
Contributor Author

@mtwalli mtwalli Jul 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the actual App SecurityProvider will be doing that ,but it is not a issue for the real app

Copy link
Contributor

@BMItr BMItr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@BMItr BMItr self-assigned this Jul 28, 2021
@sonarcloud
Copy link

sonarcloud bot commented Jul 28, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mtwalli mtwalli merged commit 6002d2d into release/2.7.x Jul 28, 2021
@mtwalli mtwalli deleted the dev/rsa-unittest branch July 28, 2021 16:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainers Tag pull requests created by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants