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

refactor: Remove stubs for java.security and java.rmi #3758

Merged

Conversation

WojciechMazur
Copy link
Contributor

@WojciechMazur WojciechMazur commented Feb 14, 2024

Remove stubs for types defined in packages java.security and java.rmi. java.security stubs, especially mock MessageDigest gives a false assumptions about security.
The only dependency on java.security in our code was used in Jar{Entry,File, InputStream} for jars verification - this was never tested (the only possible tested for #956 were ignored, so not started) and we have no guarantee it worked at any point. The verification mechanism was disabled (commented out) and might be resoted in the future.

All of the removed stubs would become available in https://github.com/scala-native/scala-native-java-stubs (published after 0.5.0 release).
I've also started to work on porting Apache Harmony java.security in a side project some time ago. If we'll manage to pass of tests we might restore and finalize JarVerification based on using external dependency or merging side project into core repo as additional, optional module.

@WojciechMazur WojciechMazur merged commit 8f0a079 into scala-native:main Feb 15, 2024
60 of 62 checks passed
@WojciechMazur WojciechMazur deleted the javalib/remove-security_rmi branch February 15, 2024 09: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.

None yet

1 participant