Skip to content

Commit

Permalink
Assert privilege accessing os.name
Browse files Browse the repository at this point in the history
Signed-off-by: Keith W. Campbell <keithc@ca.ibm.com>
  • Loading branch information
keithc-ca committed Sep 5, 2023
1 parent f0db243 commit 828d9a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 828d9a6

Please sign in to comment.