Skip to content

Preserve AS2 content line endings #1184

@m0a0k0s

Description

@m0a0k0s

Hello. I'm migrating legacy code that handles AS2 messages to MimeKit.
Old version respects the original line ending for content that passes as binary data.
In MimeKit, there's two places: encrypting ApplicationPkcs7Mime.EncryptAsync and signing MultipartSigned.CreateAsync that forces line ending transformation to DOS.
It references rfc2015 or rfc3156, section 5.1 here, but it's for plain text

// Note: see rfc2015 or rfc3156, section 5.1

When creating the message as is, the mdn calculated on original content outside MimeKit does not match with the one calculated with the result message.
I bypass it now by calling the underlying code directly without conversion part.
This is the same as #569, but another direction - creating a message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompatibilityCompatibility with existing software

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions