diff options
author | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-12-16 13:09:59 +0000 |
---|---|---|
committer | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-12-16 13:09:59 +0000 |
commit | 16d89bf90c5ff83fd3c47f6057a708b98c79271b (patch) | |
tree | d993e53fcf31b2f000e2d31732f08e328465bdd2 /src/main/java/at/gv/egiz/pdfas/impl | |
parent | d40090e3b400fe3de4ffa7179cddbe23f7b593bd (diff) | |
download | pdf-as-3-16d89bf90c5ff83fd3c47f6057a708b98c79271b.tar.gz pdf-as-3-16d89bf90c5ff83fd3c47f6057a708b98c79271b.tar.bz2 pdf-as-3-16d89bf90c5ff83fd3c47f6057a708b98c79271b.zip |
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
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java | 10 |
1 files changed, 7 insertions, 3 deletions
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);
|