From 828d9a69531d5f6fafd2e5276448ede8dba0a593 Mon Sep 17 00:00:00 2001 From: "Keith W. Campbell" Date: Tue, 5 Sep 2023 11:44:46 -0400 Subject: [PATCH] Assert privilege accessing os.name Signed-off-by: Keith W. Campbell --- src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java b/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java index 3506ce7e2f..862a37a3c1 100644 --- a/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java +++ b/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java @@ -33,6 +33,7 @@ import java.util.*; import java.security.*; +import sun.security.action.GetPropertyAction; import sun.security.util.CurveDB; import sun.security.util.NamedCurve; @@ -68,7 +69,7 @@ public final class SunEC extends Provider { private static final boolean nativeCryptTrace = NativeCrypto.isTraceEnabled(); // Flag indicating whether the operating system is AIX. - private static final boolean isAIX = "AIX".equals(System.getProperty("os.name")); + private static final boolean isAIX = "AIX".equals(GetPropertyAction.privilegedGetProperty("os.name")); /* The property 'jdk.nativeEC' is used to control enablement of the native * ECDH implementation.