GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as … by normanmaurer · Pull Request #15628 · netty/netty

Conversation

@normanmaurer

@normanmaurer normanmaurer commented Sep 5, 2025

Copy link
Copy Markdown
Member

…otherwise it will fail to init static fields.

Motivation:

We recently did some changes related to how BouncyCastle is loaded and while doing so introduce a regression which would cause NPE's later on once BouncyCastle was detected and used and we tried to apply ALPN later on. This regression was introduced by #15533

The problem was that we used the wrong class to try to obtain the Method instances via reflection. This failed as the class itself is package-private and so did not allow to access the methods. To fix this we need to ensure we use the public interface that is used by BouncyCastle and not the implemention class itself. Beside this we also should be more defensive and only try to use ALPN via BouncyCastle if we can obtain the Methods in the first place.

Modifications:

  • Fix refelective access
  • Add more guards
  • Add unit test

Result:

Fixes #15627

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@normanmaurer
normanmaurer requested a review from chrisvest September 5, 2025 13:08
@normanmaurer normanmaurer added this to the 4.1.127.Final milestone Sep 5, 2025
@normanmaurer normanmaurer mentioned this pull request Sep 5, 2025
Regression in BouncyCastleAlpnSslUtils starting from 4.1.125.Final #15627
Closed
@normanmaurer
normanmaurer force-pushed the alpn_bouncycastle branch 2 times, most recently from a5f5f48 to 8307c15 Compare September 5, 2025 13:29
@normanmaurer
BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as …
1a4c690
…otherwise it will fail to init static fields.

Motivation:

We recently did some changes related to how BouncyCastle is loaded and while doing so introduce a regression which would
cause NPE's later on once BouncyCastle was detected and used and we tried to apply ALPN later on. This regression was introduced by
#15533

The problem was that we used the wrong class to try to obtain the Method instances via reflection. This failed as the class itself is package-private
and so did not allow to access the methods. To fix this we need to ensure we use the public interface that is used by BouncyCastle and not the implemention
class itself. Beside this we also should be more defensive and only try to use ALPN via BouncyCastle if we can obtain the Methods in the first place.

Modifications:

- Fix refelective access
- Add more guards
- Add unit test

Result:

Fixes #15627

Result:

After your change, what will change.
@normanmaurer
normanmaurer force-pushed the alpn_bouncycastle branch from 8307c15 to 1a4c690 Compare September 5, 2025 13:36
@jponge

jponge commented Sep 5, 2025

Copy link
Copy Markdown

This looks good on the Quarkus integration tests that are affected by #15627

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chrisvest
chrisvest approved these changes Sep 5, 2025
View reviewed changes
@normanmaurer
normanmaurer merged commit d60b1ba into 4.1 Sep 5, 2025
@normanmaurer
normanmaurer deleted the alpn_bouncycastle branch September 5, 2025 15:33
@LuciferYang LuciferYang mentioned this pull request Sep 16, 2025
[SPARK-53599][BUILD] Upgrade Netty to 4.1.127.Final apache/spark#52356
Closed
dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Sep 16, 2025
@LuciferYang @dongjoon-hyun
[SPARK-53599][BUILD] Upgrade Netty to 4.1.127.Final
4aa934e
### What changes were proposed in this pull request?
This PR upgrades Netty from 4.1.126.Final to 4.1.127.Final and netty-tcnative from 2.0.72.Final to 2.0.73.Final.

### Why are the changes needed?
This version fixes a BouncyCastle-related regression introduced in Netty 4.1.126.Final:
- BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as otherwise it will fail to init static fields. ([#15628](netty/netty#15628))

The full release notes as follows:
- https://netty.io/news/2025/09/08/4-1-127-Final.html

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass Github Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #52356 from LuciferYang/SPARK-53599.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
@LuciferYang @huangxiaopingRD
[SPARK-53599][BUILD] Upgrade Netty to 4.1.127.Final
96f3f3b
### What changes were proposed in this pull request?
This PR upgrades Netty from 4.1.126.Final to 4.1.127.Final and netty-tcnative from 2.0.72.Final to 2.0.73.Final.

### Why are the changes needed?
This version fixes a BouncyCastle-related regression introduced in Netty 4.1.126.Final:
- BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as otherwise it will fail to init static fields. ([apache#15628](netty/netty#15628))

The full release notes as follows:
- https://netty.io/news/2025/09/08/4-1-127-Final.html

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass Github Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes apache#52356 from LuciferYang/SPARK-53599.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
prabhjyotsingh pushed a commit to acceldata-io/spark3 that referenced this pull request Sep 10, 2026
@LuciferYang @prabhjyotsingh
[SPARK-53599][BUILD] Upgrade Netty to 4.1.127.Final
60c33db
This PR upgrades Netty from 4.1.126.Final to 4.1.127.Final and netty-tcnative from 2.0.72.Final to 2.0.73.Final.

This version fixes a BouncyCastle-related regression introduced in Netty 4.1.126.Final:
- BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as otherwise it will fail to init static fields. ([apache#15628](netty/netty#15628))

The full release notes as follows:
- https://netty.io/news/2025/09/08/4-1-127-Final.html

No

Pass Github Actions

No

Closes apache#52356 from LuciferYang/SPARK-53599.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
prabhjyotsingh pushed a commit to acceldata-io/spark3 that referenced this pull request Sep 11, 2026
@LuciferYang @prabhjyotsingh
[SPARK-53599][BUILD] Upgrade Netty to 4.1.127.Final
ba1c72d
This PR upgrades Netty from 4.1.126.Final to 4.1.127.Final and netty-tcnative from 2.0.72.Final to 2.0.73.Final.

This version fixes a BouncyCastle-related regression introduced in Netty 4.1.126.Final:
- BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as otherwise it will fail to init static fields. ([apache#15628](netty/netty#15628))

The full release notes as follows:
- https://netty.io/news/2025/09/08/4-1-127-Final.html

No

Pass Github Actions

No

Closes apache#52356 from LuciferYang/SPARK-53599.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
prabhjyotsingh pushed a commit to acceldata-io/spark3 that referenced this pull request Sep 11, 2026
@LuciferYang @prabhjyotsingh
[SPARK-53599][BUILD] Upgrade Netty to 4.1.127.Final
4423d4d
This PR upgrades Netty from 4.1.126.Final to 4.1.127.Final and netty-tcnative from 2.0.72.Final to 2.0.73.Final.

This version fixes a BouncyCastle-related regression introduced in Netty 4.1.126.Final:
- BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as otherwise it will fail to init static fields. ([apache#15628](netty/netty#15628))

The full release notes as follows:
- https://netty.io/news/2025/09/08/4-1-127-Final.html

No

Pass Github Actions

No

Closes apache#52356 from LuciferYang/SPARK-53599.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Ko-dany pushed a commit to acceldata-io/spark3 that referenced this pull request Sep 11, 2026
@LuciferYang @Ko-dany
[SPARK-53599][BUILD] Upgrade Netty to 4.1.127.Final
3ecf207
This PR upgrades Netty from 4.1.126.Final to 4.1.127.Final and netty-tcnative from 2.0.72.Final to 2.0.73.Final.

This version fixes a BouncyCastle-related regression introduced in Netty 4.1.126.Final:
- BouncyCastleAlpnSslUtils needs to use the correct SSLEngine class as otherwise it will fail to init static fields. ([apache#15628](netty/netty#15628))

The full release notes as follows:
- https://netty.io/news/2025/09/08/4-1-127-Final.html

No

Pass Github Actions

No

Closes apache#52356 from LuciferYang/SPARK-53599.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
This was referenced Sep 14, 2026
Http2: Reserve promised stream for PUSH_PROMISE after local RST_STREAM #17471
Closed
cache failure 1233e4a5 #17565
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chrisvest chrisvest chrisvest approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.1.127.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@normanmaurer @jponge @chrisvest
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.