}
private void assertHttps(Collection<AssertionInfo> ais, Message message) {
for (AssertionInfo ai : ais) {
boolean asserted = true;
HttpsToken token = (HttpsToken)ai.getAssertion();
Map<String, List<String>> headers = getSetProtocolHeaders(message);
if (token.isHttpBasicAuthentication()) {
List<String> auth = headers.get("Authorization");
if (auth == null || auth.size() == 0
|| !auth.get(0).startsWith("Basic")) {
asserted = false;
}
}
if (token.isHttpDigestAuthentication()) {
List<String> auth = headers.get("Authorization");
if (auth == null || auth.size() == 0
|| !auth.get(0).startsWith("Digest")) {
asserted = false;
}
}
TLSSessionInfo tlsInfo = message.get(TLSSessionInfo.class);
if (tlsInfo != null) {
if (token.isRequireClientCertificate()
&& (tlsInfo.getPeerCertificates() == null
|| tlsInfo.getPeerCertificates().length == 0)) {
asserted = false;
}
} else {