Menu

#3 S/MIME provider doesn't copy MIME headers correctly

open
nobody
None
5
2005-07-27
2005-07-27
No

The bouncycastle provide for S/MIME doesn't copy the
headers correctly from the original MIME message.

In SMIMEEncryptionUtils it does
while (hdrEnum.hasMoreElements()) {
Header current = (Header) hdrEnum.nextElement();
encryptedMessage.setHeader(current.getName(),
current.getValue());
}

(it does this in two places)

I believe it should be using addHeader instead of
setHeader as when their are multiple headers of the
same name they are overwritten and not copied correctly.

An example of where this happens is when the original
message is going to be sent to multiple recipients -
there will be multiple "To:" headers.

Discussion


Log in to post a comment.