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

Add bcpkix-jdk15on runtimeOnly dependency to read keys with bouncycastle #2191

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Oct 25, 2022

Signed-off-by: Craig Perkins [email protected]

Description

Adds bcpkix-jdk15on to runtime classpath to make netty use bouncycastle when reading key files. Netty has fallback logic to use existing PEMReader if bouncycastle fails to read the pemfile.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Enhancement

Issues Resolved

Testing

Added unit test to test PKCS#1 format at unit test time.

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@cwperks cwperks requested a review from a team October 25, 2022 21:01
@cwperks cwperks changed the title Add bouncycastle bcpkix-jdk15on runtimeOnly dependency to read keys w… Add bcpkix-jdk15on runtimeOnly dependency to read keys with bouncycastle Oct 25, 2022
peternied
peternied previously approved these changes Oct 25, 2022
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

What a journey, started on Jul 25. Nice to see this coming to a close

@cwperks
Copy link
Member Author

cwperks commented Oct 26, 2022

This was definitely a Good first issue, I got a contribution to netty out of it :). It was really great to see open-source community members step up and patch bugs I introduced into netty to make the software more robust. Open-Source is great!

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

This is awesome! Thank you for your effort @cwperks !!!

2 nits, but should not block this PR: 1. Remove sysout 2. remove commented code

Copy link
Member

@cliu123 cliu123 left a comment

Choose a reason for hiding this comment

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

@cwperks Could you please remove the system.out line and commented line?

@cwperks cwperks dismissed stale reviews from DarshitChanpura and peternied via 64c22a1 October 26, 2022 15:20
@cwperks cwperks added the backport 2.x backport to 2.x branch label Oct 26, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #2191 (64c22a1) into main (9f9fddc) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #2191      +/-   ##
============================================
- Coverage     61.14%   61.11%   -0.04%     
+ Complexity     3266     3263       -3     
============================================
  Files           259      259              
  Lines         18335    18334       -1     
  Branches       3248     3248              
============================================
- Hits          11211    11204       -7     
- Misses         5535     5538       +3     
- Partials       1589     1592       +3     
Impacted Files Coverage Δ
...urity/ssl/transport/SecuritySSLNettyTransport.java 62.36% <0.00%> (-4.31%) ⬇️
...earch/security/ssl/util/SSLConnectionTestUtil.java 93.18% <0.00%> (-2.28%) ⬇️
...ecurity/ssl/rest/SecuritySSLReloadCertsAction.java 84.78% <0.00%> (-0.33%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@peternied peternied merged commit 966b3fc into opensearch-project:main Oct 26, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 26, 2022
…tle (#2191)

* Add bouncycastle bcpkix-jdk15on runtimeOnly dependency to read keys with bouncycastle

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 966b3fc)
peternied pushed a commit that referenced this pull request Oct 26, 2022
…tle (#2191) (#2200)

* Add bouncycastle bcpkix-jdk15on runtimeOnly dependency to read keys with bouncycastle

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 966b3fc)

Co-authored-by: Craig Perkins <[email protected]>
stephen-crawford pushed a commit to stephen-crawford/security that referenced this pull request Nov 10, 2022
…tle (opensearch-project#2191)

* Add bouncycastle bcpkix-jdk15on runtimeOnly dependency to read keys with bouncycastle

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
…tle (opensearch-project#2191) (opensearch-project#2200)

* Add bouncycastle bcpkix-jdk15on runtimeOnly dependency to read keys with bouncycastle

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 966b3fc)

Co-authored-by: Craig Perkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TLS: support PKCS#1 certificates
5 participants