aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-07-15 10:26:49 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-07-15 10:26:49 +0200
commit6f688b64b1520025d0cb574fbd8e309d1a5ffb96 (patch)
treecf84e9d188a2751aed706898008159efd7242440 /pdf-as-web/src/main
parent8eecd5504d82b4827dda5b0549e0662051f37df2 (diff)
downloadpdf-as-4-6f688b64b1520025d0cb574fbd8e309d1a5ffb96.tar.gz
pdf-as-4-6f688b64b1520025d0cb574fbd8e309d1a5ffb96.tar.bz2
pdf-as-4-6f688b64b1520025d0cb574fbd8e309d1a5ffb96.zip
Moved signer certificate info PDFAS Verification Response
Diffstat (limited to 'pdf-as-web/src/main')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java7
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java8
2 files changed, 10 insertions, 5 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
index 8ec5d6fe..ce51515e 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
@@ -426,9 +426,14 @@ public class PdfAsHelper {
PDFASSignResponse signResponse = new PDFASSignResponse();
signResponse.setSignedPDF(output.getData());
- signResponse.setSignerCertificate(signResult.getSignerCertificate()
+
+ PDFASVerificationResponse verResponse = new PDFASVerificationResponse();
+
+ verResponse.setSignerCertificate(signResult.getSignerCertificate()
.getEncoded());
+ signResponse.setVerificationResponse(verResponse);
+
return signResponse;
}
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
index cca66f82..02c1af5e 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
@@ -84,7 +84,7 @@ public class PDFASSigningImpl implements PDFASSigning {
response = PdfAsHelper.synchornousServerSignature(request.getInputData(),
request.getParameters());
- PDFASVerificationResponse verResponse = new PDFASVerificationResponse();
+
VerifyResult verifyResult = null;
if(request.getVerificationLevel().equals(VerificationLevel.FULL_CERT_PATH)) {
List<VerifyResult> verResults = PdfAsHelper.synchornousVerify(response.getSignedPDF(), -1,
@@ -104,9 +104,9 @@ public class PDFASSigningImpl implements PDFASSigning {
verifyResult = verResults.get(0);
}
- verResponse.setCertificateCode(verifyResult.getCertificateCheck().getCode());
- verResponse.setValueCode(verifyResult.getValueCheckCode().getCode());
- response.setVerificationResponse(verResponse);
+ response.getVerificationResponse().setCertificateCode(verifyResult.getCertificateCheck().getCode());
+ response.getVerificationResponse().setValueCode(verifyResult.getValueCheckCode().getCode());
+
} else {
// Signatures with user interaction!!
String id = RequestStore.getInstance().createNewStoreEntry(request);