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

8341927: Remove hardcoded SunJCE provider #21551

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mpdonova
Copy link
Contributor

@mpdonova mpdonova commented Oct 16, 2024

In this PR, I removed hard-coded security providers and replaced them with a system property, test.provider.name. If the property is not specified, the provider originally used in the test is used:

Cipher c = Cipher.getInstance("AES/GCM/NoPadding", System.getProperty("test.provider.name", "SunJCE"));


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

  • JDK-8341927: Remove hardcoded SunJCE provider (Enhancement - P2)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21551

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21551.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 16, 2024

👋 Welcome back mdonovan! 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

openjdk bot commented Oct 16, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 16, 2024
@openjdk
Copy link

openjdk bot commented Oct 16, 2024

@mpdonova The following labels will be automatically applied to this pull request:

  • security
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added security security-dev@openjdk.org serviceability serviceability-dev@openjdk.org labels Oct 16, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 16, 2024

Webrevs

@@ -84,12 +84,14 @@ private int testDefault(int testnum) throws Exception {

private int testStringProvider(int testnum) throws Exception {
// get an instance of JavaLoginConfig from SUN
Configuration c = Configuration.getInstance(JAVA_CONFIG, null, "SUN");
Configuration c = Configuration.getInstance(JAVA_CONFIG, null,
System.getProperty("test.provider.name","SUN"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System.getProperty("test.provider.name","SUN"));
System.getProperty("test.provider.name", "SUN"));

doTest(c, testnum++);

// get an instance of JavaLoginConfig from SunRsaSign
try {
c = Configuration.getInstance(JAVA_CONFIG, null, "SunRsaSign");
c = Configuration.getInstance(JAVA_CONFIG, null,
System.getProperty("test.provider.name","SunRsaSign"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System.getProperty("test.provider.name","SunRsaSign"));
System.getProperty("test.provider.name", "SunRsaSign"));

@seanjmullan
Copy link
Member

You are changing more than SunJCE providers, so the title of this bug should not be specific to SunJCE. Suggest: "Replace hardcoded security providers with new test.provider.name system property".

Are there any cases where a test has more than one hardcoded provider?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfr Pull request is ready for review security security-dev@openjdk.org serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants