Skip to content

Commit

Permalink
Merge pull request #251 from keithc-ca/privelege
Browse files Browse the repository at this point in the history
Assert privilege accessing os.name
  • Loading branch information
pshipton authored Sep 5, 2023
2 parents 1af4b9b + 7cce808 commit 4c42ec3
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 @@ -46,6 +46,7 @@

import jdk.crypto.jniprovider.NativeCrypto;

import sun.security.action.GetPropertyAction;
import sun.security.ec.ed.EdDSAKeyFactory;
import sun.security.ec.ed.EdDSAKeyPairGenerator;
import sun.security.ec.ed.EdDSASignature;
Expand All @@ -66,7 +67,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 4c42ec3

Please sign in to comment.