diff options
author | ferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-10-27 10:53:19 +0000 |
---|---|---|
committer | ferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-10-27 10:53:19 +0000 |
commit | 540365f368537e31d19ba86e57dbdfd698df2d52 (patch) | |
tree | 5717e4b2b92d902d2cd03bed0819e8997f5732f6 /src/main/java/at/knowcenter | |
parent | 02550e295c5b90acf639e3677b799a226c1dd587 (diff) | |
download | pdf-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/main/java/at/knowcenter')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/sig/X509Cert.java | 4 |
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));
}
}
|