protected void prepareSamlOutboundProtocolMessageSigningHandler(final MessageContext outboundContext) throws Exception {
        LOGGER.trace("Attempting to sign the outbound SAML message...");
        val handler = new SAMLOutboundProtocolMessageSigningHandler();
        handler.setSignErrorResponses(casProperties.getAuthn().getSamlIdp().getResponse().isSignError());
        handler.initialize();
        handler.invoke(outboundContext);
        LOGGER.debug("Signed SAML message successfully");
    }
Prepare saml outbound protocol message signing handler.

@param outboundContext the outbound context
@throws Exception the exception
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/DefaultSamlIdPObjectSigner.java