If I understand correctly, DER encoding should not be the problem, since
DER/BER allows encoding of arbitrarily sized contents. There isn't a limit on
length - well, there is, the content must be shorter than 2^(8*126) - 1, i.e.,
2^1008 - 1 bytes, inclusive.
I believe "excessively large" does not imply such messages/attachments.
- Tolga
Another problem we are trying to solve concerns very large file (or attachment
when it is a message) in S/MIME. As the ContentInfo need to be DER encoded, it
is not possible to process a buffer excessively large. What should be done in
this case?