Date: Sun, 9 May 2004 11:57:05 +1000 From: Edwin Groothuis <edwin@mavetju.org> To: freebsd-questions@freebsd.org Subject: Problem transporting signed emails Message-ID: <20040509015705.GA48222@k7.mavetju>
next in thread | raw e-mail | index | archive | help
Greetings, I've been playing with signed emails (S/MIME, OpenSSL etc) but am running into an annoying problem: "openssl smime -sign" signs the text, but it adds ^M's at the end of the lines of the original text. When piping it through to the MTA, somewhere the ^M's are lost and the signature of the file including becomes invalid. [~/openssl] edwin@k7>cat test.txt This is a test. This is a text. [~/openssl] edwin@k7>openssl smime -sign -text -signer mycert.pem -in test.txt > test.msg Enter pass phrase for mycert.pem: And then in vi: ============ 8< ==================== MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg =sha1; boundary="----259958A68922550377544CEFAD9013E9" This is an S/MIME signed message ------259958A68922550377544CEFAD9013E9 Content-Type: text/plain^M ^M This is a test.^M This is a text.^M ------259958A68922550377544CEFAD9013E9 ============ 8< ==================== Piping this through sendmail (postfix) for delivery on the same machine gives me the same text with the ^M's. Piping this through sendmail for delivery on a different machine gives me the text without the ^M's, which invalidates the signature on the email. My questions are... has somebody else ever fought with signed emails like this and did they see the same behaviour? And how did you overcome this problem. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040509015705.GA48222>