logger.writeLog();
throw new TestException("Unexpected runtime exception", e);
}
for (Iterator it = requirements.iterator(); it.hasNext(); ) {
InvocationConstraint c = (InvocationConstraint) it.next();
if ((c == Confidentiality.YES) && !suite.isConfidential()) {
logFailure("Confidentiality.YES is not supported "
+ "by suite " + suite);
}
if ((c == Confidentiality.NO) && suite.isConfidential()) {
logFailure("Confidentiality.NO is not supported "
+ "by suite " + suite);
}
if ((c == ServerAuthentication.YES) && !suite.isAuthenticated()) {
logFailure("ServerAuthentication.YES is not "
+ "supported by suite " + suite);
}
if ((c == ServerAuthentication.NO) && suite.isAuthenticated()) {
logFailure("ServerAuthentication.NO is not "
+ "supported by suite " + suite);
}
if ((c == ClientAuthentication.YES) && !suite.isAuthenticated()) {
logFailure("ClientAuthentication.YES is not "
+ "supported by suite " + suite);
}
if ((c == ClientAuthentication.YES) && !clientAuthenticated) {
logFailure("ClientAuthentication.YES is asserted, "
+ "but the client did not authenticate with the server");
}
if ((c == ClientAuthentication.NO) && clientAuthenticated) {
logFailure("ClientAuthentication.NO is asserted, "
+ "but client authenticated with the server");
}
if ((c == Integrity.YES) && !suite.isIntegrity()) {
logFailure("Integrity.YES is not supported by suite " + suite);
}
if ((c == Integrity.NO) && suite.isIntegrity()) {
logFailure("Integrity.NO is not supported by suite " + suite);
}
}
/*
* check preferences. Note that the ConfidentialityStrength
* constraint may be ignored if Confidentiality.YES is not imposed
*/
Set preferences = constraints.preferences();
for (Iterator it = preferences.iterator(); it.hasNext(); ) {
InvocationConstraint c = (InvocationConstraint) it.next();
if ((c == ConfidentialityStrength.WEAK) && !suite.isWeak()
&& imposed(constraints,Confidentiality.YES)) {
logFailure("ConfidentialityStrength.WEAK was "
+ "preferred but a strong suite "
+ "was selected:" + suite);