osl::Mutex->std::mutex in OCipherContext

Change-Id: I0a457dc8ddccc0fce42032956aff6d661d1ae80a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127403
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2021-12-23 22:24:27 +02:00 committed by Noel Grandin
parent c5a0bcf944
commit b0163975ef
2 changed files with 4 additions and 6 deletions

View file

@ -63,8 +63,6 @@ uno::Reference< xml::crypto::XCipherContext > OCipherContext::Create( CK_MECHANI
void OCipherContext::Dispose()
{
::osl::MutexGuard aGuard( m_aMutex );
if ( m_pContext )
{
PK11_DestroyContext( m_pContext, PR_TRUE );
@ -94,7 +92,7 @@ void OCipherContext::Dispose()
uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::convertWithCipherContext( const uno::Sequence< ::sal_Int8 >& aData )
{
::osl::MutexGuard aGuard( m_aMutex );
std::unique_lock aGuard( m_aMutex );
if ( m_bBroken )
throw uno::RuntimeException();
@ -174,7 +172,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::convertWithCipherContext( c
uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::finalizeCipherContextAndDispose()
{
::osl::MutexGuard aGuard( m_aMutex );
std::unique_lock aGuard( m_aMutex );
if ( m_bBroken )
throw uno::RuntimeException();

View file

@ -22,14 +22,14 @@
#include <com/sun/star/xml/crypto/XCipherContext.hpp>
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
#include <mutex>
#include <seccomon.h>
#include <secmodt.h>
class OCipherContext : public cppu::WeakImplHelper< css::xml::crypto::XCipherContext >
{
private:
::osl::Mutex m_aMutex;
std::mutex m_aMutex;
PK11SlotInfo* m_pSlot;
PK11SymKey* m_pSymKey;