summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-12-21 11:31:30 +0100
committerMiklos Vajna <vmiklos@collabora.com>2022-01-03 14:42:24 +0100
commit7d90a00a49435ddf9545a62dfea93b34ad9fb4ee (patch)
tree412533596049ad2bf155380a5c8520ef87f0db5a /xmlsecurity
parent678790f292b63c9def1f0427df20028a1f734c15 (diff)
xmlsecurity: add some more logging
We only get: warn:xmlsecurity.xmlsec:32272:32272:xmlsecurity/source/xmlsec/errorcallback.cxx:53: digests.c:226: xmlSecNssDigestVerify() 'sha1' '' 12 'data and digest do not match' when one of the XML streams have a bad hash. Add some logging to help figuring out (without a debugger) which stream is at fault. Change-Id: Ib5f39df87bcdaaac1a21eb560c8f775c42a4079f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127885 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index 1000252b15d2..b3ee76712042 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -28,6 +28,7 @@
#include <rtl/ustring.hxx>
#include <rtl/uri.hxx>
#include <comphelper/scopeguard.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/xml/crypto/XUriBinding.hpp>
@@ -63,6 +64,8 @@ static int xmlStreamMatch( const char* uri )
OUString::createFromAscii(uri));
}
}
+ SAL_INFO("xmlsecurity.xmlsec",
+ "xmlStreamMath: uri is '" << uri << "', returning " << xInputStream.is());
if (xInputStream.is())
return 1;
else
@@ -95,6 +98,8 @@ static void* xmlStreamOpen( const char* uri )
css::io::XInputStream* pInputStream ;
pInputStream = xInputStream.get() ;
pInputStream->acquire() ;
+ SAL_INFO("xmlsecurity.xmlsec",
+ "xmlStreamOpen: uri is '" << uri << "', returning context " << pInputStream);
return static_cast<void*>(pInputStream) ;
}
}
@@ -123,6 +128,8 @@ static int xmlStreamRead( void* context, char* buffer, int len )
}
}
+ SAL_INFO("xmlsecurity.xmlsec", "xmlStreamRead: context is " << context << ", buffer is now '"
+ << OString(buffer, numbers) << "'");
return numbers ;
}
@@ -134,6 +141,7 @@ static int xmlStreamClose( void * context )
css::io::XInputStream* pInputStream ;
pInputStream = static_cast<css::io::XInputStream*>(context);
pInputStream->release() ;
+ SAL_INFO("xmlsecurity.xmlsec", "xmlStreamRead: closed context " << context);
}
}