Skip to content

13: Remove export of com.oracle.jipher.provider#7

Open
jon-oracle wants to merge 3 commits into
openjdk:masterfrom
jon-oracle:remove-provider-export
Open

13: Remove export of com.oracle.jipher.provider#7
jon-oracle wants to merge 3 commits into
openjdk:masterfrom
jon-oracle:remove-provider-export

Conversation

@jon-oracle
Copy link
Copy Markdown

@jon-oracle jon-oracle commented May 26, 2026

Exporting com.oracle.jipher.provider means that all public methods/fields of the public classes in that package are an API and supported interface.

Currently com.oracle.jipher.provider is exported for two reasons:

  1. To accommodate modular applications dynamically registering the JipherJCE provider without resorting to the ServiceLoader
  2. To accommodate modular applications calling isAvailable and loadingException static methods on the com.oracle.jipher.provider.JipherJCE class

Neither (1) nor (2) are essential features of the library.

  1. modular applications can dynamically register the JipherJCE provider using the ServiceLoader
  2. the cause of failures that prevent statically or dynamically registering the JipherJCE provider using the ServiceLoader are detailed in the exception chain chained from the java.util.ServiceConfigurationError thrown by the ServiceLoader. Consequently the isAvailable and loadingException static methods are not necessary.

It would be good to limit the API to essential elements only.



Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • BRISBANE-13: Remove export of com.oracle.jipher.provider (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/brisbane.git pull/7/head:pull/7
$ git checkout pull/7

Update a local copy of the PR:
$ git checkout pull/7
$ git pull https://git.openjdk.org/brisbane.git pull/7/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7

View PR using the GUI difftool:
$ git pr show -t 7

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/brisbane/pull/7.diff

Using Webrev

Link to Webrev Comment

Eamon O'Dea added 3 commits May 26, 2026 09:32
…aded by the ServiceLoader

A `java.security` file allows:
```
security.provider.<n>=<provName | className>
```

Statically registered security providers loaded by the ServiceLoader must be registered using their provider name.
Those registered using their class name are loaded the legacy pre-module way via reflection.
…module

This change makes it no longer possible to call `new JipherJCE()` from a modular application.
A modular application must use the `ServiceLoader` to obtain an instance of the `JipherJCE` provider (that has not already been registered with the JCA).
…racle.jipher.provider.JipherJCE

Now that `com.oracle.jipher.provider` is no longer exported from the `com.oracle.jipher` module these static methods are no longer accessable to a modular application.

The original intended purpose of these static methods was for an application to be able to determine if Jipher failed to load and configure OpenSSL (and why), such as in the case where the JipherJCE Provider is statically registered.

 It is possible to reliably determine if OpenSSL failed to load by just attempting to construct a new JipherJCE instance via the ServiceLoader.  If OpenSSL failed to load the ServiceLoader throws a ServiceConfigurationError with a chain of caused-by Exceptions that includes an exception detailing why OpenSSL failed to load.  Consequently, these static methods no longer serve any purpose.
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 26, 2026

👋 Welcome back jspillett! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 26, 2026

@jon-oracle This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

13: Remove export of com.oracle.jipher.provider

Reviewed-by: eodea

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk Bot changed the title BRISBANE-13 Remove export of com.oracle.jipher.provider 13: Remove export of com.oracle.jipher.provider May 26, 2026
@openjdk openjdk Bot added the rfr Pull request is ready for review label May 26, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 26, 2026

Webrevs

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants