diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-04-14 17:15:42 +0200 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-04-14 17:15:42 +0200 |
commit | 8b216a430727a3085fbc683d1108c43456165d49 (patch) | |
tree | 09bbb2c4b50758477085b32bad5a342f0f88b8ed /lasso/xml | |
parent | 890d88c8c59cad7a6f11414d6d0ebe6fdb3ea612 (diff) | |
download | lasso-8b216a430727a3085fbc683d1108c43456165d49.tar.gz lasso-8b216a430727a3085fbc683d1108c43456165d49.tar.xz lasso-8b216a430727a3085fbc683d1108c43456165d49.zip |
[tools] redirect xmlsec errors to lasso error handler
Diffstat (limited to 'lasso/xml')
-rw-r--r-- | lasso/xml/tools.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c index 41b467df..0eeb8d2f 100644 --- a/lasso/xml/tools.c +++ b/lasso/xml/tools.c @@ -1266,6 +1266,16 @@ lasso_saml_constrain_dsigctxt(xmlSecDSigCtxPtr dsigCtx) { return TRUE; } +static void +lasso_xml_generic_error_func(G_GNUC_UNUSED void *ctx, const char *msg, ...) +{ + va_list args; + + va_start(args, msg); + g_logv(LASSO_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, msg, args); + va_end(args); +} + /** * lasso_verify_signature: * @signed_node: an #xmlNode containing an enveloped xmlDSig signature @@ -1350,6 +1360,8 @@ lasso_verify_signature(xmlNode *signed_node, xmlDoc *doc, const char *id_attr_na dsigCtx->signKey = xmlSecKeyDuplicate(public_key); } + xmlSetGenericErrorFunc(NULL, lasso_xml_generic_error_func); + /* Verify signature */ goto_cleanup_if_fail_with_rc(xmlSecDSigCtxVerify(dsigCtx, signature) >= 0, LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED); |