In message <[EMAIL PROTECTED]> on Thu, 13 Feb 2003 14:36:54
+0100 (MET), "Holger Sesterhenn via RT" <[EMAIL PROTECTED]> said:
rt> PKCS7_sign() uses SMIME_crlf_copy() to assure '\r\n' at EOL before signing.
rt> BIO_write() is used. Does BIO_write() use the C library? If it does, we
rt> have the same problems as with SMIME_write_PKCS7() because '\n' is
rt> interpreted diferent between the systems.
rt>
rt> I don't like to analyze the whole BIO stuff so could somebody please show
rt> me where BIO_printf() converts '\n' to '\r\n' on windows?
The BIO stuff uses the C library when possible. If the BIO used has
FILE* as underlying type, it's up to the user to specify if text mode
is used or not. Since a piece of mail is essencially text, I'd expect
text mode to be used. I believe the SMIME functions expect that as
well.
You can guess what happens with "\r\n" when sent to a file in text
mode on windows... And you will probably not even know what happens
on VMS (a very simple answer is: you get a lot of empty lines).
rt> Richard said: "Bodo is correct, it's not OpenSSL's
rt> responsability to do the various conversions that may be done by the
rt> C run-time library anyway."
rt>
rt> Of course it is not OpenSSL's responsability but there are clear rules
rt> (RFC2046) how a multipart mail has to look like and why don't stick to
rt> these rules?
That RFC tells you what a message should look like when sent over the
line. It has nothing to do with storage on file or anything else like
that (on VMS, mails are normally stored in files in variable length
record format. The line ends ("\n" or "\r\n") aren't even stored in
there). I won't try to guess what database-driven systems like
Microsoft Exchange does...
rt> Isn't it possible to use some #defines and/or ./configure options
rt> to detect how the underlying system library interprets '\n'?
I'm afraid not. As soon as you start looking at all the possible
outputs, you're just digging yourself deeper trying to do that.
rt> Sed is not the solution in all cirumstances and you can't count on
rt> the client to handle the EOL relaxed.
Then we're talking about a difference of philosophy. I'm assuming
those clients see the mails as a binary blob.
rt> BTW: There are at least some versions of LotusNotes which put
rt> '\r\r\n' at the end of lines.
Eeeeep.
All I can say about this is that there doesn't seem to be any easy
solution.
--
Richard Levitte \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47
\ SWEDEN \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]