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

Ensure static fields set during signed jar process #844

Conversation

jasonkatonica
Copy link
Contributor

When loading a signed jar file that is on the classpath, such as the
bouncy castle signed JCE jar file, it has been observed that the value
of restrictedJarVerificationProviders and jarVerificationProviders
are set to null. This causes a NullPointerException during the loading
process.

This update moves the static declarations of both
restrictedJarVerificationProviders and jarVerificationProviders to
be prior to the method call RestrictedSecurity.checkHashValues() since
this method call needs both of these fields to be initialized to work
correctly.

Signed-off-by: Jason Katonica katonica@us.ibm.com

Copy link
Member

@keithc-ca keithc-ca left a comment

Choose a reason for hiding this comment

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

Thank you: This more clearly shows the movement of the static initializer block. Please squash.

When loading a signed jar file that is on the classpath, such as the
bouncy castle signed JCE jar file, it has been observed that the value
of `restrictedJarVerificationProviders` and `jarVerificationProviders`
are set to `null`. This causes a NullPointerException during the loading
process.

This update moves the static declarations of both
`restrictedJarVerificationProviders` and `jarVerificationProviders` to
be prior to the method call `RestrictedSecurity.checkHashValues()` since
this method call needs both of these fields to be initialized to work
correctly.

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
@jasonkatonica jasonkatonica force-pushed the katonica/issue524/rsmfailingduetobcsignedjarsnext branch from de10fad to a2313ed Compare September 18, 2024 19:54
@jasonkatonica
Copy link
Contributor Author

Code is now squashed into a single commit.

@keithc-ca
Copy link
Member

Jenkins compile alinux jdknext

@keithc-ca keithc-ca merged commit 4aa4ebf into ibmruntimes:openj9 Sep 18, 2024
4 checks passed
@jasonkatonica jasonkatonica deleted the katonica/issue524/rsmfailingduetobcsignedjarsnext branch September 18, 2024 22:03
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.

2 participants