diff options
author | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-01-10 15:21:47 +0000 |
---|---|---|
committer | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-01-10 15:21:47 +0000 |
commit | 298655a37264ff1f0de6ceaf9b6864836ab6cdd9 (patch) | |
tree | 83e2b4261e03acd1ed92c3927e74575734de73d2 /src/main/java | |
parent | 4b4bf058f1956c9ef94cfbecaa90d618626208c6 (diff) | |
download | pdf-as-3-REL-2.34@31.tar.gz pdf-as-3-REL-2.34@31.tar.bz2 pdf-as-3-REL-2.34@31.zip |
QualifiedCertificate property (moa/bku) is now being evaluatedREL-2.34@31
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@27 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java')
3 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureResponse.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureResponse.java index f576e65..603e0fe 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureResponse.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureResponse.java @@ -98,6 +98,10 @@ public class SignatureResponse */
protected X509Cert certificate_ = null;
+ // [tknall] start qualified certificate
+ private boolean qualifiedCertificate = false;
+ // [tknall] stop qualified certificate
+
// /**
// * Flag the marks that the response is an error response
// */
@@ -315,6 +319,25 @@ public class SignatureResponse certificateCheckInfo_ = certificateCheckInfo;
}
+ // [tknall] start qualified certificate
+
+ /**
+ * Returns <code>true</code> if certificate is qualified, <code>false</code> if not.
+ * @return <code>true</code> if certificate is qualified, <code>false</code> if not.
+ */
+ public boolean isQualifiedCertificate() {
+ return this.qualifiedCertificate;
+ }
+
+ /**
+ * Sets the flag for qualified certificate.
+ * @param qualifiedCertificate The new qualified certificate status.
+ */
+ public void setQualifiedCertificate(boolean qualifiedCertificate) {
+ this.qualifiedCertificate = qualifiedCertificate;
+ }
+ // [tknall] stop qualified certificate
+
/**
* @return Returns the signatureCheckInfo.
*/
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java index 96fa81b..3b672f1 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java @@ -441,6 +441,11 @@ public class BKUConnector implements LocalConnector Pattern cer_chk_p_s = Pattern.compile("<sl:CertificateCheck>");
Pattern cer_chk_p_e = Pattern.compile("</sl:CertificateCheck>");
+ // [tknall] start qualified certificate
+ Pattern cert_qualified_p = Pattern.compile("<sl:QualifiedCertificate/>");
+ Matcher cert_qualified_m = cert_qualified_p.matcher(xmlResponse);
+ // [tknall] stop qualified certificate
+
Pattern code_p_s = Pattern.compile("<sl:Code>");
Pattern code_p_e = Pattern.compile("</sl:Code>");
Pattern info_p_s = Pattern.compile("<sl:Info>");
@@ -467,6 +472,11 @@ public class BKUConnector implements LocalConnector Matcher cert_m_e = cert_p_e.matcher(xmlResponse);
SignatureResponse sig_res = new SignatureResponse();
+
+ // [tknall] start qualified certificate
+ sig_res.setQualifiedCertificate(cert_qualified_m.find());
+ // [tknall] stop qualified certificate
+
if (sub_nam_m_s.find() && sub_nam_m_e.find())
{
String sub_nam = xmlResponse.substring(sub_nam_m_s.end(), sub_nam_m_e.start());
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java index 5e323a2..3c53b54 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java @@ -626,6 +626,11 @@ public class MOAConnector implements Connector Pattern ser_num_p_s = Pattern.compile("<dsig:X509SerialNumber>");
Pattern ser_num_p_e = Pattern.compile("</dsig:X509SerialNumber>");
+ // [tknall] start qualified certificate
+ Pattern cert_qualified_p = Pattern.compile("<QualifiedCertificate/>");
+ Matcher cert_qualified_m = cert_qualified_p.matcher(xmlResponse);
+ // [tknall] stop qualified certificate
+
Pattern sig_chk_p_s = Pattern.compile("<SignatureCheck>");
Pattern sig_chk_p_e = Pattern.compile("</SignatureCheck>");
Pattern man_chk_p_s = Pattern.compile("<SignatureManifestCheck>");
@@ -657,6 +662,11 @@ public class MOAConnector implements Connector Matcher cert_m_e = cert_p_e.matcher(xmlResponse);
SignatureResponse sig_res = new SignatureResponse();
+
+ // [tknall] start qualified certificate
+ sig_res.setQualifiedCertificate(cert_qualified_m.find());
+ // [tknall] stop qualified certificate
+
if (sub_nam_m_s.find() && sub_nam_m_e.find())
{
String sub_nam = xmlResponse.substring(sub_nam_m_s.end(), sub_nam_m_e.start());
|