protected void debugLog(CMSSignedDataParser sp) throws CMSException {
if (!LOG.isDebugEnabled()) {
return;
}
SignerInformationStore signers = sp.getSignerInfos();
Set<AlgorithmIdentifier> messageDigestAlgorithms = sp.getDigestAlgorithmIDs();
for (AlgorithmIdentifier algorithm : messageDigestAlgorithms) {
LOG.debug("Message digest algorithm: {}", algorithm.getAlgorithm().getId());
}
LOG.debug("Included Signer Infos:");
int i = 0;
for (SignerInformation signer : signers.getSigners()) {
i++;
LOG.debug(" Signer {}: {}", new Object[] {i, signerInformationToString(signer)});
if (signer.getSignedAttributes() != null) {
@SuppressWarnings("unchecked")
Hashtable<String, Attribute> authAttTable = signer.getSignedAttributes().toHashtable();
if (authAttTable != null) {
LOG.debug(" Signed attributes of signer {}: {}", i, attributesToString(authAttTable));
}
}
if (signer.getUnsignedAttributes() != null) {
@SuppressWarnings("unchecked")
Hashtable<String, Attribute> unAuthAtts = signer.getUnsignedAttributes().toHashtable();
if (unAuthAtts != null) {
LOG.debug(" Unsigned attributes of signer {}: {}", i, attributesToString(unAuthAtts));
}
}
}
}