Signer now throws a SignatureException if errors are encountered when signing.
authorputmanb <putmanb@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 13 Feb 2008 22:56:16 +0000 (22:56 +0000)
committerputmanb <putmanb@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 13 Feb 2008 22:56:16 +0000 (22:56 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2617 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java

index 43c9b48..125e523 100644 (file)
@@ -61,6 +61,7 @@ import org.opensaml.xml.security.SecurityException;
 import org.opensaml.xml.security.SecurityHelper;
 import org.opensaml.xml.security.credential.Credential;
 import org.opensaml.xml.signature.Signature;
+import org.opensaml.xml.signature.SignatureException;
 import org.opensaml.xml.signature.Signer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -664,6 +665,9 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
         } catch (MarshallingException e) {
             log.error("Unable to marshall assertion for signing", e);
             throw new ProfileException("Unable to marshall assertion for signing", e);
+        } catch (SignatureException e) {
+            log.error("Unable to sign assertion", e);
+            throw new ProfileException("Unable to sign assertion", e);
         }
     }
 }
\ No newline at end of file
index 6397b18..f58c1aa 100644 (file)
@@ -75,6 +75,7 @@ import org.opensaml.xml.security.credential.UsageType;
 import org.opensaml.xml.security.criteria.EntityIDCriteria;
 import org.opensaml.xml.security.criteria.UsageCriteria;
 import org.opensaml.xml.signature.Signature;
+import org.opensaml.xml.signature.SignatureException;
 import org.opensaml.xml.signature.Signer;
 import org.opensaml.xml.util.DatatypeHelper;
 import org.slf4j.Logger;
@@ -538,6 +539,9 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
         } catch (MarshallingException e) {
             log.error("Unable to marshall assertion for signing", e);
             throw new ProfileException("Unable to marshall assertion for signing", e);
+        } catch (SignatureException e) {
+            log.error("Unable to sign assertion", e);
+            throw new ProfileException("Unable to sign assertion", e);
         }
     }