Skip to content

Commit 4c42ec3

Browse files
authored
Merge pull request #251 from keithc-ca/privelege
Assert privilege accessing os.name
2 parents 1af4b9b + 7cce808 commit 4c42ec3

File tree

1 file changed

+2
-1
lines changed
  • src/jdk.crypto.ec/share/classes/sun/security/ec

1 file changed

+2
-1
lines changed

src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
import jdk.crypto.jniprovider.NativeCrypto;
4848

49+
import sun.security.action.GetPropertyAction;
4950
import sun.security.ec.ed.EdDSAKeyFactory;
5051
import sun.security.ec.ed.EdDSAKeyPairGenerator;
5152
import sun.security.ec.ed.EdDSASignature;
@@ -66,7 +67,7 @@ public final class SunEC extends Provider {
6667
private static final boolean nativeCryptTrace = NativeCrypto.isTraceEnabled();
6768

6869
// Flag indicating whether the operating system is AIX.
69-
private static final boolean isAIX = "AIX".equals(System.getProperty("os.name"));
70+
private static final boolean isAIX = "AIX".equals(GetPropertyAction.privilegedGetProperty("os.name"));
7071

7172
/* The property 'jdk.nativeEC' is used to control enablement of the native
7273
* ECDH implementation.

0 commit comments

Comments
 (0)