S/MIME decrypt

This commit is contained in:
M66B
2019-12-02 10:49:27 +01:00
parent 0e4e96ef69
commit cb0db5de3e
3 changed files with 54 additions and 17 deletions

View File

@@ -1089,6 +1089,19 @@ public class MessageHelper {
return result;
}
Integer getEncryption() {
for (AttachmentPart apart : attachments)
if (EntityAttachment.PGP_SIGNATURE.equals(apart.attachment.encryption))
return EntityMessage.PGP_SIGNONLY;
else if (EntityAttachment.PGP_MESSAGE.equals(apart.attachment.encryption))
return EntityMessage.PGP_SIGNENCRYPT;
else if (EntityAttachment.SMIME_SIGNATURE.equals(apart.attachment.encryption))
return EntityMessage.SMIME_SIGNONLY;
else if (EntityAttachment.SMIME_MESSAGE.equals(apart.attachment.encryption))
return EntityMessage.SMIME_SIGNENCRYPT;
return null;
}
void downloadAttachment(Context context, EntityAttachment local) throws IOException, MessagingException {
List<EntityAttachment> remotes = getAttachments();