summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index be48ae34b232..5b1b0212073c 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -22,8 +22,10 @@
* Implementation of the I/O interfaces based on stream and URI binding
*/
#include <xmlsec/xmlstreamio.hxx>
+#include <xmlsec/errorcallback.hxx>
#include <rtl/ustring.hxx>
#include <rtl/uri.hxx>
+#include <comphelper/scopeguard.hxx>
#include <libxml/uri.h>
#include <xmlsec-wrapper.h>
@@ -151,6 +153,10 @@ XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks()
//Notes: all none default callbacks will lose.
xmlSecIOCleanupCallbacks() ;
+ // Make sure that errors are reported via SAL_WARN().
+ setErrorRecorder();
+ comphelper::ScopeGuard g([] { clearErrorRecorder(); });
+
// Newer xmlsec wants the callback order in the opposite direction.
if (xmlSecCheckVersionExt(1, 2, 26, xmlSecCheckVersionABICompatible))
{