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

Migrate to stock Bouncycastle #1881

Merged
merged 1 commit into from
May 16, 2020

Conversation

TranceLove
Copy link
Collaborator

Fixes #1870.

Per @Neustradamus suggested and rtyley/spongycastle#34 we should deprecate Spongycastle and use Bouncycastle directly without worrying about package name/class loading collisions.

Changes:

  • Remove stock Bouncycastle provider bundled with Android
  • Register updated Bouncycastle provider as first crypto provider available
  • Remove proguard config related to Spongycastle
  • Update code to obtain crypto provider directly without prefix

Related robolectric tests passed, Espresso tests were passed on Android emulators running 4.4, 6.0, 8.0, Oneplus 2 running AOSPExtended (7.1.2) and Fairphone 3 running LineageOS 16 GSI (9.0). Also tested on Fairphone 3 with production build (proguard enabled) on encrypting/decrypting files and establishing SSH connections.

Fixes TeamAmaze#1870.

Per

- Remove stock Bouncycastle provider bundled with Android
- Register updated Bouncycastle provider as first crypto provider available
- Remove proguard config related to Spongycastle
- Update code to obtain crypto provider directly without prefix
@TranceLove TranceLove added Issue-Task (low) This isn't a bug, but should be dealt with. Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. labels Apr 20, 2020
@VishalNehra
Copy link
Member

VishalNehra commented May 2, 2020

Working as expected. Approving. However, there's a miss in a use-case and the app crashes. I think it because of other PR we recently merged (using URI to handle file opening). I'm unable to test the encrypted file opening part because of the bug.
Please acknowledge this bug
#1883

@bowiechen bowiechen merged commit 0927acc into TeamAmaze:master May 16, 2020
@Neustradamus
Copy link

@TranceLove, @VishalNehra, @bowiechen: Thanks a lot!
But not complete: https://github.com/TeamAmaze/AmazeFileManager/search?q=spongycastle&unscoped_q=spongycastle

@TranceLove
Copy link
Collaborator Author

Oops, my bad. Will do a little PR to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Issue-Task (low) This isn't a bug, but should be dealt with.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

For more security spongycastle -> bouncycastle
4 participants