Earlier this year I collaborated with my colleagues in the Oracle OCI SDK team to do some refactoring that enabled the OCI Java SDK’s dependency chain to be trimmed by eliminating the dependency on the BouncyCastle SDK.
BouncyCastle is a broad and rich set of APIs for cryptography related functionality. The OCI Java SDK was only using a very small set of capabilities from the SDK (reading and writing PEM encoded files). Almost all the capabilities required to do this exist in the base Java JDK (although not yet exposed in an easy to use API). I had to figure out how address the gaps in the base Java JDK functionality, wrap it in an easy to use API and replace the existing calls to the BouncyCastle APIs with equivalent calls to the new API.
These changes have now landed in version 3.50.1 (released October 2024) of the OCI Java SDK.