xmlsecurity/source/xmlsec/xmlstreamio.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 11eefc1efaa617cf75449b5f81e39faed1b3448a Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Dec 21 11:31:30 2021 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Dec 21 11:35:08 2021 +0100 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/+/127221 Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx index 1000252b15d2..ccdca022b184 100644 --- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx +++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx @@ -63,6 +63,8 @@ static int xmlStreamMatch( const char* uri ) OUString::createFromAscii(uri)); } } + SAL_INFO("xmlsecurity", + "xmlStreamMath: uri is '" << uri << "', returning " << xInputStream.is()); if (xInputStream.is()) return 1; else @@ -95,6 +97,8 @@ static void* xmlStreamOpen( const char* uri ) css::io::XInputStream* pInputStream ; pInputStream = xInputStream.get() ; pInputStream->acquire() ; + SAL_INFO("xmlsecurity", + "xmlStreamOpen: uri is '" << uri << "', returning context " << pInputStream); return static_cast<void*>(pInputStream) ; } } @@ -123,6 +127,8 @@ static int xmlStreamRead( void* context, char* buffer, int len ) } } + SAL_INFO("xmlsecurity", "xmlStreamRead: context is " << context << ", buffer is now '" + << OString(buffer, numbers) << "'"); return numbers ; } @@ -134,6 +140,7 @@ static int xmlStreamClose( void * context ) css::io::XInputStream* pInputStream ; pInputStream = static_cast<css::io::XInputStream*>(context); pInputStream->release() ; + SAL_INFO("xmlsecurity", "xmlStreamRead: closed context " << context); } }