244 String clientAuth) {
245 this.cipherSuite = cipherSuite;
246 this.protocol = protocol;
247 this.clientAuth = clientAuth;
248 }
249
250 boolean isEnabled() {
251 return true;
252 }
253
254 @Override
255 public String toString() {
256 String s = cipherSuite + " in " + protocol + " mode";
257 if (clientAuth != null) {
258 s += " with " + clientAuth + " client authentication";
259 }
260 return s;
261 }
262 }
263
264 private static volatile CipherTestUtils instnace = null;
265
266 public static CipherTestUtils getInstance() throws IOException,
267 FileNotFoundException, KeyStoreException,
268 NoSuchAlgorithmException, CertificateException,
269 UnrecoverableKeyException, InvalidKeySpecException {
270 if (instnace == null) {
271 synchronized (CipherTestUtils.class) {
272 if (instnace == null) {
273 instnace = new CipherTestUtils();
274 }
275 }
276 }
277 return instnace;
278 }
279
280 public static void setTestedArguments(String testedProtocol,
281 String testedCipherSuite) {
282
283 TestParameters testedParams;
284
285 String cipherSuite = testedCipherSuite.trim();
286 if (cipherSuite.startsWith("SSL_")) {
287 testedParams =
288 new TestParameters(cipherSuite, testedProtocol, null);
289 TESTS.add(testedParams);
290
291 } else {
292 System.out.println("Your input Cipher suites is not correct, "
293 + "please try another one .");
294 }
295 }
296
297 public X509ExtendedKeyManager getClientKeyManager() {
|
244 String clientAuth) {
245 this.cipherSuite = cipherSuite;
246 this.protocol = protocol;
247 this.clientAuth = clientAuth;
248 }
249
250 boolean isEnabled() {
251 return true;
252 }
253
254 @Override
255 public String toString() {
256 String s = cipherSuite + " in " + protocol + " mode";
257 if (clientAuth != null) {
258 s += " with " + clientAuth + " client authentication";
259 }
260 return s;
261 }
262 }
263
264 private static volatile CipherTestUtils instance = null;
265
266 public static CipherTestUtils getInstance() throws IOException,
267 FileNotFoundException, KeyStoreException,
268 NoSuchAlgorithmException, CertificateException,
269 UnrecoverableKeyException, InvalidKeySpecException {
270 if (instance == null) {
271 synchronized (CipherTestUtils.class) {
272 if (instance == null) {
273 instance = new CipherTestUtils();
274 }
275 }
276 }
277 return instance;
278 }
279
280 public static void setTestedArguments(String testedProtocol,
281 String testedCipherSuite) {
282
283 TestParameters testedParams;
284
285 String cipherSuite = testedCipherSuite.trim();
286 if (cipherSuite.startsWith("SSL_")) {
287 testedParams =
288 new TestParameters(cipherSuite, testedProtocol, null);
289 TESTS.add(testedParams);
290
291 } else {
292 System.out.println("Your input Cipher suites is not correct, "
293 + "please try another one .");
294 }
295 }
296
297 public X509ExtendedKeyManager getClientKeyManager() {
|