Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-68662] Rewrite PEMHelper to use BouncyCastle APIs #23

Merged
merged 2 commits into from
Jun 14, 2022

Conversation

jmdesprez
Copy link
Contributor

Updating the plugin to use org.jenkins-ci.plugins:bouncycastle-api will give a more consistent result when running on a FIPS OS.
See this ticket for more details.

This have to be merged after migrating the module to a plugin

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link
Member

@jtnord jtnord left a comment

Choose a reason for hiding this comment

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

is there a test that shows we can still read files written before the migration?

@jmdesprez
Copy link
Contributor Author

jmdesprez commented Jun 7, 2022

is there a test that shows we can still read files written before the migration?

@jtnord Tests still use the old files src/test/resources/private-key-pcks1.pem and src/test/resources/private-key-pcks8.pem but I don't know if this is good enough, especially since I don't know how these files were generated. I can use the old version of the plugin to generate a file if needed.

@jtnord
Copy link
Member

jtnord commented Jun 7, 2022

is there a test that shows we can still read files written before the migration?

@jtnord Tests still use the old files src/test/resources/private-key-pcks1.pem and src/test/resources/private-key-pcks8.pem but I don't know if this is good enough, especially since I don't know how these files were generated. I can use the old version of the plugin to generate a file if needed.

if they exist and are used that should be good enough.

@jmdesprez
Copy link
Contributor Author

is there a test that shows we can still read files written before the migration?

@jtnord Tests still use the old files src/test/resources/private-key-pcks1.pem and src/test/resources/private-key-pcks8.pem but I don't know if this is good enough, especially since I don't know how these files were generated. I can use the old version of the plugin to generate a file if needed.

if they exist and are used that should be good enough.

Yep, org.jenkinsci.main.modules.instance_identity.ReadWriteKeyTest#testReadIdentityPKCS1vsPKCS8 reads both files, decodes, then compares encoded public and private keys

@jtnord jtnord marked this pull request as ready for review June 8, 2022 10:53
@jtnord jtnord merged commit 9bfd3f4 into jenkinsci:master Jun 14, 2022
@jglick
Copy link
Member

jglick commented Jun 14, 2022

@jtnord you need to block this release from the update center as in jenkins-infra/update-center2#594 as it is not a plugin until jenkinsci/jenkins#6585 is released, and even then this release will be exposed to older cores.

@jtnord
Copy link
Member

jtnord commented Jun 14, 2022

@jtnord you need to block this release from the update center as in jenkins-infra/update-center2#594 as it is not a plugin until jenkinsci/jenkins#6585 is released, and even then this release will be exposed to older cores.

👍 jenkins-infra/update-center2#601

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.

7 participants