Kaydet (Commit) 9518a9af authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Caolán McNamara

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.

(cherry picked from commit 099ab643)

Change-Id: Ia19368b55dbae47974f48954f86b50e36d1462ff
Reviewed-on: https://gerrit.libreoffice.org/64605
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 64d54e91
......@@ -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))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment