aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/X509Cert.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/X509Cert.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/X509Cert.java
index b18b7ac..fbd89fa 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/X509Cert.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/X509Cert.java
@@ -325,7 +325,11 @@ public class X509Cert implements Serializable
{
byte[] cert_b64 = CodingHelper.decodeBase64(certString_);
// dferbas: read digest method from certificate
- String digestAlg = this.x509Cert_.getSigAlgName().split("/")[0];
+ String sigAlgName = this.x509Cert_.getSigAlgName();
+ String digestAlg = sigAlgName.split("/")[0];
+ if (sigAlgName.toLowerCase().indexOf("with") != -1 ) {
+ digestAlg = sigAlgName.substring(0,sigAlgName.toLowerCase().indexOf("with"));
+ }
byte[] cert_hash = CodingHelper.buildDigest(cert_b64, digestAlg);
certDigest_ = new String(CodingHelper.encodeBase64(cert_hash));
}