xmlsecurity/source/xmlsec/nss/ciphercontext.cxx |    6 ++----
 xmlsecurity/source/xmlsec/nss/ciphercontext.hxx |    4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit b0163975efc6924c154793590a759784ffa77d08
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Thu Dec 23 22:24:27 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Dec 24 14:45:11 2021 +0100

    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.gran...@collabora.co.uk>

diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx 
b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
index c4d1c6113bf6..ff3441249435 100644
--- a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
+++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
@@ -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();
diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx 
b/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx
index 3ac5df6c7fd0..40b610ef512e 100644
--- a/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx
+++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx
@@ -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;

Reply via email to