Reverting my previous revert and moving to bouncycastle 1.48. Fixing issue #3498!