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 | |
| 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
3 files changed, 14 insertions, 155 deletions
| diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHCPType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHCPType.java deleted file mode 100644 index 6a2d5fd2e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHCPType.java +++ /dev/null @@ -1,145 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2  -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>  -// Any modifications to this file will be lost upon recompilation of the source schema.  -// Generated on: 2014.04.12 at 12:22:50 PM GMT  -// - - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p>Java class for isHCPType complex type. - *  - * <p>The following schema fragment specifies the expected content contained within this class. - *  - * <pre> - * <complexType name="isHCPType"> - *   <complexContent> - *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - *       <sequence> - *         <element name="nameOfOrganisation" type="{http://www.w3.org/2001/XMLSchema}string"/> - *         <element name="HCPType" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}HCPType"/> - *         <element name="specialisation" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}specialisationType"/> - *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/> - *       </sequence> - *     </restriction> - *   </complexContent> - * </complexType> - * </pre> - *  - *  - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isHCPType", propOrder = { -    "nameOfOrganisation", -    "hcpType", -    "specialisation", -    "aqaa" -}) -public class IsHCPType { - -    @XmlElement(required = true) -    protected String nameOfOrganisation; -    @XmlElement(name = "HCPType", required = true) -    protected String hcpType; -    @XmlElement(required = true) -    protected String specialisation; -    @XmlElement(name = "AQAA") -    protected int aqaa; - -    /** -     * Gets the value of the nameOfOrganisation property. -     *  -     * @return -     *     possible object is -     *     {@link String } -     *      -     */ -    public String getNameOfOrganisation() { -        return nameOfOrganisation; -    } - -    /** -     * Sets the value of the nameOfOrganisation property. -     *  -     * @param value -     *     allowed object is -     *     {@link String } -     *      -     */ -    public void setNameOfOrganisation(String value) { -        this.nameOfOrganisation = value; -    } - -    /** -     * Gets the value of the hcpType property. -     *  -     * @return -     *     possible object is -     *     {@link String } -     *      -     */ -    public String getHCPType() { -        return hcpType; -    } - -    /** -     * Sets the value of the hcpType property. -     *  -     * @param value -     *     allowed object is -     *     {@link String } -     *      -     */ -    public void setHCPType(String value) { -        this.hcpType = value; -    } - -    /** -     * Gets the value of the specialisation property. -     *  -     * @return -     *     possible object is -     *     {@link String } -     *      -     */ -    public String getSpecialisation() { -        return specialisation; -    } - -    /** -     * Sets the value of the specialisation property. -     *  -     * @param value -     *     allowed object is -     *     {@link String } -     *      -     */ -    public void setSpecialisation(String value) { -        this.specialisation = value; -    } - -    /** -     * Gets the value of the aqaa property. -     *  -     */ -    public int getAQAA() { -        return aqaa; -    } - -    /** -     * Sets the value of the aqaa property. -     *  -     */ -    public void setAQAA(int value) { -        this.aqaa = value; -    } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java index 217ca4ec4..f1ea05d65 100644 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java @@ -243,9 +243,9 @@ public class ObjectFactory {       * Create an instance of {@link IsHCPType }       *        */ -    public IsHCPType createIsHCPType() { -        return new IsHCPType(); -    } +    //public IsHCPType createIsHCPType() { +    //    return new IsHCPType(); +    //}      /**       * Create an instance of {@link JAXBElement }{@code <}{@link HabilitationType }{@code >}} 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) { | 
