aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java9
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerificationResponse.java9
-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
4 files changed, 19 insertions, 14 deletions
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java
index 19517a13..3e8a360b 100644
--- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASSignResponse.java
@@ -39,7 +39,6 @@ public class PDFASSignResponse implements Serializable {
String requestID;
String error;
byte[] signedPDF;
- byte[] signerCertificate;
PDFASVerificationResponse verificationResponse;
String redirectUrl;
@@ -59,14 +58,6 @@ public class PDFASSignResponse implements Serializable {
this.signedPDF = signedPDF;
}
- @XmlElement(required = false, nillable = false, name="signerCertificate")
- public byte[] getSignerCertificate() {
- return signerCertificate;
- }
- public void setSignerCertificate(byte[] signerCertificate) {
- this.signerCertificate = signerCertificate;
- }
-
@XmlElement(required = false, nillable = false, name="verificationResponse")
public PDFASVerificationResponse getVerificationResponse() {
return verificationResponse;
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerificationResponse.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerificationResponse.java
index c4fb438d..720b4438 100644
--- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerificationResponse.java
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/api/ws/PDFASVerificationResponse.java
@@ -15,6 +15,7 @@ public class PDFASVerificationResponse implements Serializable {
int valueCode;
int certificateCode;
+ byte[] signerCertificate;
@XmlElement(required = true, nillable = false, name="valueCode")
public int getValueCode() {
@@ -31,4 +32,12 @@ public class PDFASVerificationResponse implements Serializable {
public void setCertificateCode(int certificateCode) {
this.certificateCode = certificateCode;
}
+
+ @XmlElement(required = false, nillable = false, name="signerCertificate")
+ public byte[] getSignerCertificate() {
+ return signerCertificate;
+ }
+ public void setSignerCertificate(byte[] signerCertificate) {
+ this.signerCertificate = signerCertificate;
+ }
}
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);