aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/X509Cert.java4
1 files changed, 3 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 8aaa49a..1a2ccbc 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
@@ -324,7 +324,9 @@ public class X509Cert implements Serializable
if (certString_ != null)
{
byte[] cert_b64 = CodingHelper.decodeBase64(certString_);
- byte[] cert_hash = CodingHelper.buildDigest(cert_b64);
+ // dferbas: read digest method from certificate
+ String digestAlg = this.x509Cert_.getSigAlgName().split("/")[0];
+ byte[] cert_hash = CodingHelper.buildDigest(cert_b64, digestAlg);
certDigest_ = new String(CodingHelper.encodeBase64(cert_hash));
}
}