GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Always load BouncyCastle classes with the Netty classloader by chrisvest · Pull Request #15533 · netty/netty Conversation
Member
Motivation: Modification: Result: Fixes #15508
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsMotivation: Between Java security settings, different classloaders, and native image compilation, loading the BouncyCastle classes are somewhat complicated. Modification: Collect all the BouncyCastle class loading and availability checking in a new BouncyCastleUtil class. Make use of this new class in our BouncyCastle implementations of ALPN, PEM reading, and self-signed certificate generation. Result: We should hopefully now be loading the classes correctly in all cases. Fixes netty#15508 Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chrisvest is this really something we want to expose to the user ? Especially the reset method etc might make things easy to mess up for users.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use BouncyCastle in two different packages. Either something needs to be public, or we duplicate the code.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not super happy that a user could call
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh never mind then... did miss this.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
normanmaurer
approved these changes
chrisvest
added a commit
to chrisvest/netty
that referenced
this pull request
) Motivation: Between Java security settings, different classloaders, and native image compilation, loading the BouncyCastle classes are somewhat complicated. Modification: Collect all the BouncyCastle class loading and availability checking in a new BouncyCastleUtil class. Make use of this new class in our BouncyCastle implementations of ALPN, PEM reading, and self-signed certificate generation. Result: We should hopefully now be loading the classes correctly in all cases. Fixes netty#15508 --------- Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
…15569) Motivation: Between Java security settings, different classloaders, and native image compilation, loading the BouncyCastle classes are somewhat complicated. Modification: Collect all the BouncyCastle class loading and availability checking in a new BouncyCastleUtil class. Make use of this new class in our BouncyCastle implementations of ALPN, PEM reading, and self-signed certificate generation. Result: We should hopefully now be loading the classes correctly in all cases. Fixes #15508 Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
…15569) Motivation: Between Java security settings, different classloaders, and native image compilation, loading the BouncyCastle classes are somewhat complicated. Modification: Collect all the BouncyCastle class loading and availability checking in a new BouncyCastleUtil class. Make use of this new class in our BouncyCastle implementations of ALPN, PEM reading, and self-signed certificate generation. Result: We should hopefully now be loading the classes correctly in all cases. Fixes #15508 Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
#15570) …(#15569) Motivation: Between Java security settings, different classloaders, and native image compilation, loading the BouncyCastle classes are somewhat complicated. Modification: Collect all the BouncyCastle class loading and availability checking in a new BouncyCastleUtil class. Make use of this new class in our BouncyCastle implementations of ALPN, PEM reading, and self-signed certificate generation. Result: We should hopefully now be loading the classes correctly in all cases. Fixes #15508 Co-authored-by: Chris Vest <[email protected]>
chrisvest
added a commit
to chrisvest/netty
that referenced
this pull request
) (netty#15569) Motivation: Between Java security settings, different classloaders, and native image compilation, loading the BouncyCastle classes are somewhat complicated. Modification: Collect all the BouncyCastle class loading and availability checking in a new BouncyCastleUtil class. Make use of this new class in our BouncyCastle implementations of ALPN, PEM reading, and self-signed certificate generation. Result: We should hopefully now be loading the classes correctly in all cases. Fixes netty#15508 Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
…15569) (#15572) Motivation: Between Java security settings, different classloaders, and native image compilation, loading the BouncyCastle classes are somewhat complicated. Modification: Collect all the BouncyCastle class loading and availability checking in a new BouncyCastleUtil class. Make use of this new class in our BouncyCastle implementations of ALPN, PEM reading, and self-signed certificate generation. Result: We should hopefully now be loading the classes correctly in all cases. Fixes #15508 Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
…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
added a commit
that referenced
this pull request
…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
added a commit
that referenced
this pull request
…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
added a commit
that referenced
this pull request
…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
added a commit
that referenced
this pull request
…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
added a commit
that referenced
this pull request
#15628) …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
normanmaurer
added a commit
that referenced
this pull request
#15630) …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
cmark
added a commit
to b2ihealthcare/snow-owl
that referenced
this pull request
...when initializing self-signed certs Required as Netty changed BC Provider class loading logic in release 4.1.125.Final, see here: netty/netty#15533
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |