diff options
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 7 | ||||
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java | 8 |
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); |