aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-10-27 10:53:19 +0000
committerferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-10-27 10:53:19 +0000
commit540365f368537e31d19ba86e57dbdfd698df2d52 (patch)
tree5717e4b2b92d902d2cd03bed0819e8997f5732f6 /src
parent02550e295c5b90acf639e3677b799a226c1dd587 (diff)
downloadpdf-as-3-540365f368537e31d19ba86e57dbdfd698df2d52.tar.gz
pdf-as-3-540365f368537e31d19ba86e57dbdfd698df2d52.tar.bz2
pdf-as-3-540365f368537e31d19ba86e57dbdfd698df2d52.zip
parameterized codinghelper with hash method
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@356 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src')
-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));
}
}