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

Illegal reflective access #669

Closed
tobiashort opened this issue Mar 9, 2020 · 3 comments
Closed

Illegal reflective access #669

tobiashort opened this issue Mar 9, 2020 · 3 comments

Comments

@tobiashort
Copy link

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.bouncycastle.jcajce.provider.drbg.DRBG (file:/app-1.0.0/lib/bcprov-jdk15on-1.60.jar) to constructor sun.security.provider.Sun()
WARNING: Please consider reporting this to the maintainers of org.bouncycastle.jcajce.provider.drbg.DRBG
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

I think this needs fix. Probably a Java 12 / 13 issue?

@bcgit
Copy link
Collaborator

bcgit commented Mar 11, 2020

Which version of the APIs did you see this with?

@tobiashort
Copy link
Author

I came across this issue when using sshj version 0.27.0, which uses org.bouncycastle:bcpkix-jdk15on:1.60 and org.bouncycastle:bcprov-jdk15on:1.60.

See also hierynomus/sshj#568

Does this answer your question?

I think the problem is that the class DRGB.java access an internal API, which might be dangerous

{"sun.security.provider.Sun", "sun.security.provider.SecureRandom"},

@bcgit
Copy link
Collaborator

bcgit commented Mar 11, 2020

They just need to move to a more recent version of bcprov - Java 1.8 (eventually) introduced getInstanceStrong() the BC provider will call that preferentially to get access to the JVM's entropy source.

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

No branches or pull requests

1 participant