// Strip out any Kerberos Suites for now.
ArrayList list = new ArrayList(supported.length); for (int i = 0; i < supported.length; i++) { if (!supported[i].startsWith("TLS_KRB5")) {
list.add(supported[i]);
}
}
supported = (String [])list.toArray(new String [0]);
if (argv.length == 2) {
config = argv [0];
NTHREADS = Integer.parseInt (argv [1]);
} elseif (argv.length == 1) {
config = argv [0];
NTHREADS = 15;
} else { /* temporaraly changed to make it run under jtreg with *defaultconfiguration,whennoinputparametersare *given
*/ //usage(); //return;
config = "default";
NTHREADS = supported.length;
}
// More options ... port #. different clnt/svr configs, // cipher suites, etc.
ServerThread server = new ServerThread (0, NTHREADS, sslContext);
Vector clients = new Vector (NTHREADS);
if (!(config.equals("default") || config.equals("random")))
supported = new String[] {config};
// // iterate over all cipher suites // int next = 0; int passes = 0;
if (usesRandom (config))
next = nextUnsignedRandom ();
for (int i = 0; i < NTHREADS; i++, next++) {
ClientThread client = new ClientThread (server.getServerPort(), sslContext);
String cipher [] = new String [1];
setConfig (client, config, supported);
next = next % supported.length;
cipher [0] = supported [next];
client.setBasicCipherSuites (cipher);
// // Win95 has been observed to choke if you throw many // connections at it. So we make it easy to unthread // everything; it can be handy outside Win95 too. //
client.start (); if (!server.getUseMT ()) {
waitForClient (client); if (client.passed ())
passes++;
} else
clients.addElement (client);
}
while (!clients.isEmpty ()) {
ClientThread client;
privatestaticint nextUnsignedRandom ()
{ int retval = prng.nextInt ();
if (retval < 0) return -retval; else return retval;
}
// // Randomness in testing can be good and bad ... covers more // territory, but not reproducibly. // privatestaticboolean usesRandom (String config)
{ return config.equalsIgnoreCase ("random");
}
if (test instanceof ClientThread) {
test.setListenHandshake (true);
test.setIterations (20);
}
// XXX role reversals !!!
// // We can establish a reasonable degree of variability // on the test data and configs ... expecting that the // diagnostics will identify any problems that exist. // Client and server must agree on these things. // // Unless we do this, only the SSL nonces and ephemeral // keys will be unpredictable in a given test run. Those // affect only the utmost innards of SSL, details which // are not visible to applications. // if (usesRandom (config)) { int rand = nextUnsignedRandom ();
if (test instanceof ClientThread)
test.setIterations (rand % 35);
if ((rand & 0x080) == 0)
test.setInitiateHandshake (true); // if ((rand & 0x040) == 0) // test.setDoRenegotiate (true);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.