@@ -923,6 +923,34 @@ void testAddValidationInformation()
923923 checkLTV (outFile );
924924 }
925925
926+ /**
927+ * PDFBOX-5521: Check that UR3 signature doesn't interfere.
928+ *
929+ * @param externallySign
930+ *
931+ * @throws IOException
932+ * @throws GeneralSecurityException
933+ * @throws CMSException
934+ * @throws OperatorCreationException
935+ * @throws TSPException
936+ * @throws CertificateVerificationException
937+ */
938+ @ ParameterizedTest
939+ @ MethodSource ("signingTypes" )
940+ void testPDFBox5521 (boolean externallySign )
941+ throws IOException , GeneralSecurityException , CMSException ,
942+ OperatorCreationException , TSPException , CertificateVerificationException
943+ {
944+ // sign PDF
945+ CreateSignature signing = new CreateSignature (keyStore , PASSWORD .toCharArray ());
946+ signing .setExternalSigning (externallySign );
947+
948+ final String fileNameSigned = getOutputFileName ("PDFBOX-5521-santander_freistellungsauftrag.pdf_signed{0}.pdf" , externallySign );
949+ final File file = new File ("target/pdfs" , "PDFBOX-5521-santander_freistellungsauftrag.pdf" );
950+ signing .signDetached (file , new File (OUT_DIR + fileNameSigned ));
951+ checkSignature (file , new File (OUT_DIR , fileNameSigned ), false );
952+ }
953+
926954 private void checkLTV (File outFile )
927955 throws IOException , GeneralSecurityException , OCSPException , OperatorCreationException ,
928956 CMSException
0 commit comments