From 6f688b64b1520025d0cb574fbd8e309d1a5ffb96 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 15 Jul 2014 10:26:49 +0200 Subject: Moved signer certificate info PDFAS Verification Response --- .../src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 7 ++++++- .../src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'pdf-as-web/src/main/java/at/gv/egiz') 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 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); -- cgit v1.2.3