title: PDF External Signature issue with embedding certificate
body: <p>We are able to do the external signature of PDF in one way and it verifies but the certificate is not visible.  With one change we are able to get the certificate to show but then the PDF no longer verifies.</p>
  
  <p>The code we have written is more or less on the lines of all the samples we have found on the net.</p>
  
  <p>When we use:</p>
  
  <pre><code>PdfSignature(PdfName.ADOBE_PPKLITE, PdfName.ADBE_PKCS7_SHA1);
  </code></pre>
  
  <p>We get a pdf that verifies but the certificate is not viewable in the PDF.  In FoxIT reader, the "Show Certificate" button is disabled.</p>
  
  <p>When we change it to:</p>
  
  <pre><code>PdfSignature(PdfName.ADOBE_PPKLITE, PdfName.ADBE_PKCS7_DETACHED);
  </code></pre>
  
  <p>The show certificate button is enabled (in Foxit Reader), and the certificate is shown, but the PDF is no longer verified.  It shows:</p>
  
  <pre><code>Signature is INVALID
  
  The document has been altered or corrupted since the Signature was applied
  
  Certified by the current user
  </code></pre>
  
  <p>Our signing code is the conversion of the presign/postsign servlets as given in the <a href="http://itextpdf.com/book/digitalsignatures20130304.pdf" rel="nofollow">digitalsignature</a> guide.</p>
  
  <p>What am I missing?</p>