116 theFactory = new DefaultSSLSocketFactory(e);
117 return theFactory;
118 }
119 }
120 }
121
122 try {
123 return SSLContext.getDefault().getSocketFactory();
124 } catch (NoSuchAlgorithmException | UnsupportedOperationException e) {
125 return new DefaultSSLSocketFactory(e);
126 }
127 }
128
129 static String getSecurityProperty(final String name) {
130 return AccessController.doPrivileged(new PrivilegedAction<>() {
131 @Override
132 public String run() {
133 String s = java.security.Security.getProperty(name);
134 if (s != null) {
135 s = s.trim();
136 if (s.length() == 0) {
137 s = null;
138 }
139 }
140 return s;
141 }
142 });
143 }
144
145 /**
146 * Returns the list of cipher suites which are enabled by default.
147 * Unless a different list is enabled, handshaking on an SSL connection
148 * will use one of these cipher suites. The minimum quality of service
149 * for these defaults requires confidentiality protection and server
150 * authentication (that is, no anonymous cipher suites).
151 * <P>
152 * The returned array includes cipher suites from the list of standard
153 * cipher suite names in the <a href=
154 * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
155 * JSSE Cipher Suite Names</a> section of the Java Cryptography
156 * Architecture Standard Algorithm Name Documentation, and may also
|
116 theFactory = new DefaultSSLSocketFactory(e);
117 return theFactory;
118 }
119 }
120 }
121
122 try {
123 return SSLContext.getDefault().getSocketFactory();
124 } catch (NoSuchAlgorithmException | UnsupportedOperationException e) {
125 return new DefaultSSLSocketFactory(e);
126 }
127 }
128
129 static String getSecurityProperty(final String name) {
130 return AccessController.doPrivileged(new PrivilegedAction<>() {
131 @Override
132 public String run() {
133 String s = java.security.Security.getProperty(name);
134 if (s != null) {
135 s = s.trim();
136 if (s.isEmpty()) {
137 s = null;
138 }
139 }
140 return s;
141 }
142 });
143 }
144
145 /**
146 * Returns the list of cipher suites which are enabled by default.
147 * Unless a different list is enabled, handshaking on an SSL connection
148 * will use one of these cipher suites. The minimum quality of service
149 * for these defaults requires confidentiality protection and server
150 * authentication (that is, no anonymous cipher suites).
151 * <P>
152 * The returned array includes cipher suites from the list of standard
153 * cipher suite names in the <a href=
154 * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
155 * JSSE Cipher Suite Names</a> section of the Java Cryptography
156 * Architecture Standard Algorithm Name Documentation, and may also
|