return fitness;
}
AssertionSet as = policy.getAssertionSet();
Iterator<PolicyAssertion> ast = as.iterator();
while(ast.hasNext()){
PolicyAssertion assertion = ast.next();
if(PolicyUtil.isSignatureToken(assertion, spVersion)){
this.signatureToken = ((com.sun.xml.ws.security.impl.policy.Token)assertion).getToken();
}else if(PolicyUtil.isEncryptionToken(assertion, spVersion)){
this.encryptionToken =((com.sun.xml.ws.security.impl.policy.Token)assertion).getToken();
}else if(PolicyUtil.isProtectionToken(assertion, spVersion)){
this.protectionToken = ((com.sun.xml.ws.security.impl.policy.Token)assertion).getToken();
}else if(PolicyUtil.isAlgorithmAssertion(assertion, spVersion)){
this.algSuite = (AlgorithmSuite) assertion;
String sigAlgo = assertion.getAttributeValue(new QName("signatureAlgorithm"));
this.algSuite.setSignatureAlgorithm(sigAlgo);
}else if(PolicyUtil.isIncludeTimestamp(assertion, spVersion)){
this.includeTimestamp = true;
}else if(PolicyUtil.isEncryptBeforeSign(assertion, spVersion)){
this.protectionOrder = ENCRYPT_SIGN;
}else if (PolicyUtil.isSignBeforeEncrypt(assertion, spVersion)){
this.protectionOrder = SIGN_ENCRYPT;
}else if(PolicyUtil.isContentOnlyAssertion(assertion, spVersion)){
this.contentOnly = false;
}else if(PolicyUtil.isMessageLayout(assertion, spVersion)){
layout = ((Layout)assertion).getMessageLayout();
}else if(PolicyUtil.isProtectTokens(assertion, spVersion)){
this.protectToken = true;
}else if(PolicyUtil.isEncryptSignature(assertion, spVersion)){
this.protectSignature = true;
} else if(PolicyUtil.disableTimestampSigning(assertion)){
this.disableTimestampSigning = true;
} else{
if(!assertion.isOptional()){
log_invalid_assertion(assertion, isServer,SymmetricBinding);
fitness = AssertionFitness.HAS_UNKNOWN_ASSERTION;
}
}
}