diff options
author | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-12-04 15:10:37 +0100 |
---|---|---|
committer | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-12-04 15:10:37 +0100 |
commit | d6637f8e82b41936b962f2197dee8cf89d0fe0b9 (patch) | |
tree | a2028b68a01d7d3b7e484f5433a7f53b1e05dc31 /id/server/stork2-saml-engine/src/main/java/eu/stork | |
parent | 84eeb92c422102e3fd04b0140db6af2ecd2623ec (diff) | |
download | moa-id-spss-d6637f8e82b41936b962f2197dee8cf89d0fe0b9.tar.gz moa-id-spss-d6637f8e82b41936b962f2197dee8cf89d0fe0b9.tar.bz2 moa-id-spss-d6637f8e82b41936b962f2197dee8cf89d0fe0b9.zip |
health attributes update and bouncycastle bug workaround
Diffstat (limited to 'id/server/stork2-saml-engine/src/main/java/eu/stork')
-rw-r--r-- | id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java index d415375e7..0984bb9ca 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java @@ -220,13 +220,17 @@ public class SignSW implements SAMLEngineSignI { final String serialNum = certificate.getSerialNumber() .toString(16); - X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); - X509Principal issuerDNConf = new X509Principal(issuer); - - if (serialNum.equalsIgnoreCase(serialNumber) - && X509PrincipalUtil.equals(issuerDN, issuerDNConf)) { - alias = aliasCert; - find = true; + try { + X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); + X509Principal issuerDNConf = new X509Principal(issuer); + + if (serialNum.equalsIgnoreCase(serialNumber) + && X509PrincipalUtil.equals(issuerDN, issuerDNConf)) { + alias = aliasCert; + find = true; + } + } catch (Exception ex) { + LOG.error("Exception during signing: " + ex.getMessage()); // Added as a workaround for Bouncycastle email error } } if (!find) { |