title: iTextPDF 5.5.0 BouncyCastle dependency issue
body: <p>I'm trying to extract digital signature data from signed PDF using iTextPDF in Java. My code is:</p>
  
  <pre><code>PdfReader reader = new PdfReader(is);
  AcroFields af = reader.getAcroFields();
  ArrayList&lt;String&gt; names = af.getSignatureNames();
  if(names == null || names.isEmpty()) return null;
      KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
      ks.load(null, null);
      ArrayList&lt;Map&lt;QName, Serializable&gt;&gt; aspects = new ArrayList&lt;Map&lt;QName, Serializable&gt;&gt;();
      for (String name : names) {
          System.out.println("Signature name: " + name);
          System.out.println("Signature covers whole document: " + af.signatureCoversWholeDocument(name));
          System.out.println("Document revision: " + af.getRevision(name) + " of " + af.getTotalRevisions());
  
          PdfPKCS7 pk = af.verifySignature(name);
          X509Certificate certificate = pk.getSigningCertificate();
  
          Map&lt;QName, Serializable&gt; aspectSignatureProperties = new HashMap&lt;QName, Serializable&gt;(); 
          aspectSignatureProperties.put(SignModel.PROP_CERTIFICATE_PRINCIPAL, certificate.getSubjectX500Principal().toString());
          aspectSignatureProperties.put(SignModel.PROP_CERTIFICATE_SERIAL_NUMBER, certificate.getSerialNumber().toString());
          aspectSignatureProperties.put(SignModel.PROP_CERTIFICATE_NOT_AFTER, certificate.getNotAfter());
          aspectSignatureProperties.put(SignModel.PROP_CERTIFICATE_ISSUER, certificate.getIssuerX500Principal().toString());   
          aspects.add(aspectSignatureProperties);
      }
  </code></pre>
  
  <p>However, at <code>PdfPKCS7 pk = af.verifySignature(name);</code> i get this Exception:</p>
  
  <pre><code>Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1ObjectIdentifier
  at com.itextpdf.text.pdf.AcroFields.verifySignature(AcroFields.java:2349)
  at com.itextpdf.text.pdf.AcroFields.verifySignature(AcroFields.java:2302)
  at es.keensoft.alfresco.behaviour.CustomBehaviour.getDigitalSignatures(CustomBehaviour.java:133)
  at es.keensoft.alfresco.behaviour.CustomBehaviour.onCreateNode(CustomBehaviour.java:78)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.alfresco.repo.policy.JavaBehaviour$JavaMethodInvocationHandler.invoke(JavaBehaviour.java:174)
  at com.sun.proxy.$Proxy54.onCreateNode(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.alfresco.repo.policy.TransactionBehaviourQueue.execute(TransactionBehaviourQueue.java:245)
  ... 41 more
  </code></pre>
  
  <p><code>Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.ASN1ObjectIdentifier
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
      ... 56 more</code></p>
  
  <p>I tried to include BouncyCastle dependencies but then I get: </p>
  
  <blockquote>
    <p>Signer information does not match</p>
  </blockquote>
  
  <p>Any ideas?
  Thanks</p>
  
  <p>EDIT:</p>
  
  <p>I'm using Maven with these dependencies:</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;com.itextpdf&lt;/groupId&gt;
          &lt;artifactId&gt;itextpdf&lt;/artifactId&gt;
          &lt;version&gt;5.5.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.bouncycastle&lt;/groupId&gt;
          &lt;artifactId&gt;bcprov-jdk15on&lt;/artifactId&gt;
          &lt;version&gt;1.49&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.bouncycastle&lt;/groupId&gt;
          &lt;artifactId&gt;bcpkix-jdk15on&lt;/artifactId&gt;
          &lt;version&gt;1.49&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>and I'm getting the following error:</p>
  
  <pre><code>java.lang.SecurityException: class "org.bouncycastle.asn1.ASN1ObjectIdentifier"'s signer information does not match signer information of other classes in the same package
  </code></pre>