CanonicalizingStream

This commit is contained in:
M66B
2023-07-02 08:36:37 +02:00
parent beeba4c999
commit cd821fc7c3
2 changed files with 109 additions and 19 deletions

View File

@@ -3835,7 +3835,8 @@ public class FragmentCompose extends FragmentBase {
};
bpContent.setContent(imessage.getContent(), imessage.getContentType());
try (OutputStream out = new FileOutputStream(input)) {
try (OutputStream out = new MessageHelper.CanonicalizingStream(
new BufferedOutputStream(new FileOutputStream(input)))) {
bpContent.writeTo(out);
}
} else {
@@ -4248,8 +4249,9 @@ public class FragmentCompose extends FragmentBase {
// Build content
File sinput = new File(tmp, draft.id + ".smime_sign");
try (FileOutputStream fos = new FileOutputStream(sinput)) {
bpContent.writeTo(fos);
try (OutputStream os = new MessageHelper.CanonicalizingStream(
new BufferedOutputStream(new FileOutputStream(sinput)))) {
bpContent.writeTo(os);
}
if (EntityMessage.SMIME_SIGNONLY.equals(type)) {