Kaydet (Commit) 2d832c26 authored tarafından Matúš Kukan's avatar Matúš Kukan

webdav: Workaround failing unlocking by ignoring certificates when closing.

In neon version, we use xml::crypto::SEInitializer in
NeonSession_CertificationNotify which I see called only once.
For some reason in serf, Serf_ConnectSetup is called every time
we send a command to the server. But that leads to not working
verifySerfCertificateChain in __run_exit_handlers because
xml::crypto::SEInitializer is not available anymore.

Change-Id: I15685256790375dd86eb1b7614da25838d5ce244
üst 06072a97
......@@ -75,6 +75,7 @@ void TickerThread::run()
SerfLockStore::SerfLockStore()
: m_pTickerThread( 0 )
, m_bFinishing( false )
{
}
......@@ -82,6 +83,7 @@ SerfLockStore::SerfLockStore()
SerfLockStore::~SerfLockStore()
{
stopTicker();
m_bFinishing = true;
// release active locks, if any.
SAL_WARN_IF( !m_aLockInfoMap.empty(), "ucb.ucp.webdav",
......@@ -96,6 +98,10 @@ SerfLockStore::~SerfLockStore()
}
}
bool SerfLockStore::finishing() const
{
return m_bFinishing;
}
void SerfLockStore::startTicker()
{
......
......@@ -55,12 +55,14 @@ class SerfLockStore
{
osl::Mutex m_aMutex;
TickerThread * m_pTickerThread;
bool m_bFinishing;
LockInfoMap m_aLockInfoMap;
public:
SerfLockStore();
~SerfLockStore();
bool finishing() const;
OUString getLockToken( const OUString& rLock );
void addLock( const OUString& rLock,
......
......@@ -352,6 +352,13 @@ apr_status_t SerfSession::verifySerfCertificateChain (
return SERF_SSL_CERT_UNKNOWN_FAILURE;
}
// When called from SerfLockStore::~SerfLockStore(),
// css::xml::crypto::SEInitializer::create() will fail
// but we want to send unlock commands anyway,
// so just ignore certificates and return here.
if (apr_environment::AprEnv::getAprEnv()->getSerfLockStore()->finishing())
return APR_SUCCESS;
// Create some crypto objects to decode and handle the base64
// encoded certificate chain.
uno::Reference< security::XCertificateContainer > xCertificateContainer;
......
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