mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 07:23:03 +00:00
Fixed S/MIME sign+encrypt
This commit is contained in:
parent
61b78fe6fe
commit
f41a369ed3
1 changed files with 9 additions and 4 deletions
|
@ -4255,10 +4255,15 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
// Build content
|
||||
File sinput = new File(tmp, draft.id + ".smime_sign");
|
||||
try (OutputStream os = new MessageHelper.CanonicalizingStream(
|
||||
new BufferedOutputStream(new FileOutputStream(sinput)), EntityAttachment.SMIME_CONTENT, null)) {
|
||||
bpContent.writeTo(os);
|
||||
}
|
||||
if (EntityMessage.SMIME_SIGNONLY.equals(type))
|
||||
try (OutputStream os = new MessageHelper.CanonicalizingStream(
|
||||
new BufferedOutputStream(new FileOutputStream(sinput)), EntityAttachment.SMIME_CONTENT, null)) {
|
||||
bpContent.writeTo(os);
|
||||
}
|
||||
else
|
||||
try (FileOutputStream fos = new FileOutputStream(sinput)) {
|
||||
bpContent.writeTo(fos);
|
||||
}
|
||||
|
||||
if (EntityMessage.SMIME_SIGNONLY.equals(type)) {
|
||||
EntityAttachment cattachment = new EntityAttachment();
|
||||
|
|
Loading…
Reference in a new issue