} else {
log.debug("Getting message number: "+msgPos);
msg = getMessageFromResponse(response, msgPos);
}
SMIMESignedParser s = null;
if (log.isDebugEnabled()) {
log.debug("Content-type: "+msg.getContentType());
}
if (msg.isMimeType("multipart/signed")) { // $NON-NLS-1$
MimeMultipart multipart = (MimeMultipart) msg.getContent();
s = new SMIMESignedParser(new BcDigestCalculatorProvider(), multipart);
} else if (msg.isMimeType("application/pkcs7-mime") // $NON-NLS-1$
|| msg.isMimeType("application/x-pkcs7-mime")) { // $NON-NLS-1$
s = new SMIMESignedParser(new BcDigestCalculatorProvider(), msg);
}
if (null != s) {
log.debug("Found signature");