From 49ee19b808bf49969a6b23ed114bd8a118d48213 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Wed, 10 Jan 2024 10:05:42 -0500 Subject: [PATCH] update --- .../openj9/internal/security/RestrictedSecurity.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java b/closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java index d5729cb4bb7..18f5eae750a 100644 --- a/closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java +++ b/closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java @@ -1,6 +1,6 @@ /* * =========================================================================== - * (c) Copyright IBM Corp. 2022, 2023 All Rights Reserved + * (c) Copyright IBM Corp. 2022, 2024 All Rights Reserved * =========================================================================== * * This code is free software; you can redistribute it and/or modify it @@ -954,6 +954,7 @@ boolean isRestrictedProviderAllowed(String providerName) { debug.println("Checking the provider " + providerName + " in restricted security mode."); } + // Provider name defined in provider construction method. providerName = getProvidersSimpleName(providerName); // Check if the provider is in restricted security provider list. @@ -994,14 +995,7 @@ private static String getProvidersSimpleName(String providerName) { pos = providerName.indexOf('-'); providerName = (pos < 0) ? providerName : providerName.substring(0, pos); - if (providerName.equals("com.sun.net.ssl.internal.ssl.Provider")) { - // In JDK 8, the main class for the SunJSSE provider is - // com.sun.net.ssl.internal.ssl.Provider - return "SunJSSE"; - } else if (providerName.equals("sun.security.provider.Sun")) { - // In JDK 8, the main class for the SUN provider is sun.security.provider.Sun - return "SUN"; - } else if (providerName.equals("com.sun.security.sasl.Provider")) { + if (providerName.equals("com.sun.security.sasl.Provider")) { // The main class for the SunSASL provider is com.sun.security.sasl.Provider return "SunSASL"; } else {