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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user