title: openssl smime demo programs (smenc.c and smdec.c) produces inconsistent result
body: <p>I am looking at the sample programs under openssl-1.0.1e/demos/smime. Here are my steps:</p>
  
  <pre><code>gcc -o smenc smenc.c -lcrypto
  gcc -o smdec smdec.c -lcrypto
  ./smenc     -&gt; This encrypts encr.txt into smencr.txt
  ./smdec     -&gt; This decrypts smencr.txt into encrout.txt
  </code></pre>
  
  <p>Now compare the round-trip results with the original:</p>
  
  <pre><code>vimdiff -b encr.txt encrout.txt
  </code></pre>
  
  <p>You can see the round-trip result has an extra '\r' for each line. Does someone know at what stage those '\r' chars are added?</p>
  
  <p>Thanks in advance</p>