title: Openssl command line fails to verify detached smime signature created moments earlier
body: <p>I'm using the command line interface of openssl 1.0.1b on OSX 10.6.</p>
  
  <p>First I create a DSA key.</p>
  
  <pre><code>openssl dsaparam -noout -out privatekey.pem -genkey 1024
  </code></pre>
  
  <p>Next i create a self-signed certificate from that key.</p>
  
  <pre><code>openssl req -new -outform PEM -out certificate.pem -key privatekey.pem -keyform PEM -sha1 -x509 -days 1000
  </code></pre>
  
  <p>Next i use that certificate and key in order to create a detached smime signature of a file.</p>
  
  <pre><code>openssl smime -sign -in file.zip -out file.zip.signature -outform DER -inkey privatekey.pem -signer certificate.pem
  </code></pre>
  
  <p>Finally I immediately try to verify that same file/signature*</p>
  
  <pre><code>openssl smime -verify -in file.zip.signature -inform DER -content file.zip -noverify certificate.pem &gt; /dev/null
  </code></pre>
  
  <p>But somehow I get a digest failure.</p>
  
  <pre><code>PKCS7 routines:PKCS7_signatureVerify:digest failure:pk7_doit.c:1097:
  PKCS7 routines:PKCS7_verify:signature failure:pk7_smime.c:410
  </code></pre>
  
  <p>Nothing is changing the file, manual md5 hashes match before and after, yet somehow the signature digest is failing. Does anyone have any clue as to what i'm doing wrong?</p>
  
  <p>Thanks.</p>
  
  <p>`* <em>Note that -noverify is used to tell openssl to not warn me about the certificate being self-signed</em></p>