From 16d89bf90c5ff83fd3c47f6057a708b98c79271b Mon Sep 17 00:00:00 2001 From: pdanner Date: Thu, 16 Dec 2010 13:09:59 +0000 Subject: verify(VerifyAfterReconstructXMLDsigParameters) now uses the signatureDevice which was used in reconstructXMLDsig(...) if non is set explicitly in the VerifyAfterReconstructXMLDsigParameters git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@716 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/gv/egiz/pdfas/impl') diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java index 3433565..96e5ad1 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java @@ -541,7 +541,7 @@ public class PdfAsObject implements PdfAs } } - return new ReconstructXMLDsigResult().setExtendedSignatures(extendedSignatureInfos); + return new ReconstructXMLDsigResult(extendedSignatureInfos, reconstructXMLDsigParameters.getSignatureDevice()); } /** @@ -553,8 +553,12 @@ public class PdfAsObject implements PdfAs try { List extSignatures = verifyAfterReconstructXMLDsigParameters.getReconstructXMLDsigResult().getExtendedSignatures(); + String signatureDevice = verifyAfterReconstructXMLDsigParameters.getSignatureDevice(); + if (signatureDevice == null){ + signatureDevice = verifyAfterReconstructXMLDsigParameters.getReconstructXMLDsigResult().getDevice(); + } List results = PdfAS.verifyExtendedSignatureHolders(extSignatures, - verifyAfterReconstructXMLDsigParameters.getSignatureDevice(), + signatureDevice, verifyAfterReconstructXMLDsigParameters.isReturnHashInputData(), verifyAfterReconstructXMLDsigParameters.getVerificationTime(), verifyAfterReconstructXMLDsigParameters.getVerifySignatureIndex()); @@ -585,7 +589,7 @@ public class PdfAsObject implements PdfAs vrs.add(vr); } - VerifyResultsImpl verifyResults = new VerifyResultsImpl(vrs); + VerifyResultsImpl verifyResults = new VerifyResultsImpl(vrs); return verifyResults; } catch (java.lang.OutOfMemoryError e) { throw new OutOfMemoryException(ErrorCode.OUT_OF_MEMORY_ERROR, "Insufficient memory allocated to virtual machine. Start Java with parameters \"-Xms128m -Xmx786m -XX:MaxPermSize=256m\".", e); -- cgit v1.2.3