48 * be the maximum version supported by the client (i.e. the version it |
48 * be the maximum version supported by the client (i.e. the version it |
49 * requested in its client hello version). However, we (and other |
49 * requested in its client hello version). However, we (and other |
50 * implementations) used to send the active negotiated version. The |
50 * implementations) used to send the active negotiated version. The |
51 * system property below allows to toggle the behavior. |
51 * system property below allows to toggle the behavior. |
52 */ |
52 */ |
53 private final static String PROP_NAME = |
53 private static final String PROP_NAME = |
54 "com.sun.net.ssl.rsaPreMasterSecretFix"; |
54 "com.sun.net.ssl.rsaPreMasterSecretFix"; |
55 |
55 |
56 /* |
56 /* |
57 * Default is "false" (old behavior) for compatibility reasons in |
57 * Default is "false" (old behavior) for compatibility reasons in |
58 * SSLv3/TLSv1. Later protocols (TLSv1.1+) do not use this property. |
58 * SSLv3/TLSv1. Later protocols (TLSv1.1+) do not use this property. |
59 */ |
59 */ |
60 private final static boolean rsaPreMasterSecretFix = |
60 private static final boolean rsaPreMasterSecretFix = |
61 AccessController.doPrivileged(new PrivilegedAction<Boolean>() { |
61 AccessController.doPrivileged(new PrivilegedAction<Boolean>() { |
62 public Boolean run() { |
62 public Boolean run() { |
63 String value = System.getProperty(PROP_NAME); |
63 String value = System.getProperty(PROP_NAME); |
64 if (value != null && value.equalsIgnoreCase("true")) { |
64 if (value != null && value.equalsIgnoreCase("true")) { |
65 return Boolean.TRUE; |
65 return Boolean.TRUE; |