equal
deleted
inserted
replaced
24 */ |
24 */ |
25 |
25 |
26 package sun.security.ssl; |
26 package sun.security.ssl; |
27 |
27 |
28 import java.io.PrintStream; |
28 import java.io.PrintStream; |
29 import java.security.AccessController; |
|
30 import java.util.Locale; |
29 import java.util.Locale; |
31 |
30 |
32 import sun.security.util.HexDumpEncoder; |
31 import sun.security.util.HexDumpEncoder; |
33 import java.nio.ByteBuffer; |
32 import java.nio.ByteBuffer; |
34 |
33 |
44 private String prefix; |
43 private String prefix; |
45 |
44 |
46 private static String args; |
45 private static String args; |
47 |
46 |
48 static { |
47 static { |
49 args = java.security.AccessController.doPrivileged( |
48 args = GetPropertyAction.getProperty("javax.net.debug", ""); |
50 new GetPropertyAction("javax.net.debug", "")); |
|
51 args = args.toLowerCase(Locale.ENGLISH); |
49 args = args.toLowerCase(Locale.ENGLISH); |
52 if (args.equals("help")) { |
50 if (args.equals("help")) { |
53 Help(); |
51 Help(); |
54 } |
52 } |
55 } |
53 } |
182 * |
180 * |
183 * Note use of doPrivileged(). Do make accessible to applications. |
181 * Note use of doPrivileged(). Do make accessible to applications. |
184 */ |
182 */ |
185 static boolean getBooleanProperty(String propName, boolean defaultValue) { |
183 static boolean getBooleanProperty(String propName, boolean defaultValue) { |
186 // if set, require value of either true or false |
184 // if set, require value of either true or false |
187 String b = AccessController.doPrivileged( |
185 String b = GetPropertyAction.getProperty(propName); |
188 new GetPropertyAction(propName)); |
|
189 if (b == null) { |
186 if (b == null) { |
190 return defaultValue; |
187 return defaultValue; |
191 } else if (b.equalsIgnoreCase("false")) { |
188 } else if (b.equalsIgnoreCase("false")) { |
192 return false; |
189 return false; |
193 } else if (b.equalsIgnoreCase("true")) { |
190 } else if (b.equalsIgnoreCase("true")) { |