|
|
@ -2372,7 +2372,9 @@ public class MessageHelper {
|
|
|
|
if ("application/pgp-signature".equals(protocol) ||
|
|
|
|
if ("application/pgp-signature".equals(protocol) ||
|
|
|
|
"application/pkcs7-signature".equals(protocol) ||
|
|
|
|
"application/pkcs7-signature".equals(protocol) ||
|
|
|
|
"application/x-pkcs7-signature".equals(protocol)) {
|
|
|
|
"application/x-pkcs7-signature".equals(protocol)) {
|
|
|
|
Multipart multipart = (Multipart) part.getContent();
|
|
|
|
Object content = part.getContent();
|
|
|
|
|
|
|
|
if (content instanceof Multipart) {
|
|
|
|
|
|
|
|
Multipart multipart = (Multipart) content;
|
|
|
|
if (multipart.getCount() == 2) {
|
|
|
|
if (multipart.getCount() == 2) {
|
|
|
|
getMessageParts(multipart.getBodyPart(0), parts, null);
|
|
|
|
getMessageParts(multipart.getBodyPart(0), parts, null);
|
|
|
|
getMessageParts(multipart.getBodyPart(1), parts,
|
|
|
|
getMessageParts(multipart.getBodyPart(1), parts,
|
|
|
@ -2405,13 +2407,17 @@ public class MessageHelper {
|
|
|
|
sb.append(' ').append(i).append('=').append(multipart.getBodyPart(i).getContentType());
|
|
|
|
sb.append(' ').append(i).append('=').append(multipart.getBodyPart(i).getContentType());
|
|
|
|
Log.e(sb.toString());
|
|
|
|
Log.e(sb.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
throw new MessagingException("Multipart=" + (content == null ? null : content.getClass().getName()));
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
Log.e(ct.toString());
|
|
|
|
Log.e(ct.toString());
|
|
|
|
} else if (part.isMimeType("multipart/encrypted")) {
|
|
|
|
} else if (part.isMimeType("multipart/encrypted")) {
|
|
|
|
ContentType ct = new ContentType(part.getContentType());
|
|
|
|
ContentType ct = new ContentType(part.getContentType());
|
|
|
|
String protocol = ct.getParameter("protocol");
|
|
|
|
String protocol = ct.getParameter("protocol");
|
|
|
|
if ("application/pgp-encrypted".equals(protocol) || protocol == null) {
|
|
|
|
if ("application/pgp-encrypted".equals(protocol) || protocol == null) {
|
|
|
|
Multipart multipart = (Multipart) part.getContent();
|
|
|
|
Object content = part.getContent();
|
|
|
|
|
|
|
|
if (content instanceof Multipart) {
|
|
|
|
|
|
|
|
Multipart multipart = (Multipart) content;
|
|
|
|
if (multipart.getCount() == 2) {
|
|
|
|
if (multipart.getCount() == 2) {
|
|
|
|
// Ignore header
|
|
|
|
// Ignore header
|
|
|
|
getMessageParts(multipart.getBodyPart(1), parts, EntityAttachment.PGP_MESSAGE);
|
|
|
|
getMessageParts(multipart.getBodyPart(1), parts, EntityAttachment.PGP_MESSAGE);
|
|
|
@ -2423,6 +2429,8 @@ public class MessageHelper {
|
|
|
|
sb.append(' ').append(i).append('=').append(multipart.getBodyPart(i).getContentType());
|
|
|
|
sb.append(' ').append(i).append('=').append(multipart.getBodyPart(i).getContentType());
|
|
|
|
Log.e(sb.toString());
|
|
|
|
Log.e(sb.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
throw new MessagingException("Multipart=" + (content == null ? null : content.getClass().getName()));
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
Log.e(ct.toString());
|
|
|
|
Log.e(ct.toString());
|
|
|
|
} else if (part.isMimeType("application/pkcs7-mime") ||
|
|
|
|
} else if (part.isMimeType("application/pkcs7-mime") ||
|
|
|
|