diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2018-12-04 17:48:47 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2018-12-04 21:35:54 +0100 |
commit | 099ab643f60efc5be6f151bff89651efd2da1fc9 (patch) | |
tree | 7e00e4f34a24870a42b6dfbd0c85d431cf4aa8bc /xmlsecurity | |
parent | 1c8eb8ba49340b7b59a9f1a5f28cd8bee06cd4d1 (diff) |
tdf#118373 xmlsecurity: avoid stderr output on libxmlsec version check
Make sure that our normal SAL_WARN() reporting is registered during the
xmlSecCheckVersionExt() invocation, just like it's registered during
other libxmlsec API calls.
Change-Id: Ia19368b55dbae47974f48954f86b50e36d1462ff
Reviewed-on: https://gerrit.libreoffice.org/64550
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/xmlstreamio.cxx | 6 |
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)) { |