diff options
Diffstat (limited to 'xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx')
-rw-r--r-- | xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index 2f6f6f4cc6d5..ea2f8ce27e73 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -29,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmlsecurity.hxx" #include <sal/config.h> -#include <rtl/uuid.h> +#include <comphelper/servicehelper.hxx> #include "x509certificate_mscryptimpl.hxx" #include "certificateextension_xmlsecimpl.hxx" #include "sanextension_mscryptimpl.hxx" @@ -489,17 +489,14 @@ sal_Int64 SAL_CALL X509Certificate_MSCryptImpl :: getSomething( const Sequence< } /* XUnoTunnel extension */ + +namespace +{ + class theX509Certificate_MSCryptImplUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theX509Certificate_MSCryptImplUnoTunnelId > {}; +} + const Sequence< sal_Int8>& X509Certificate_MSCryptImpl :: getUnoTunnelId() { - static Sequence< sal_Int8 >* pSeq = 0 ; - if( !pSeq ) { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - if( !pSeq ) { - static Sequence< sal_Int8> aSeq( 16 ) ; - rtl_createUuid( ( sal_uInt8* )aSeq.getArray() , 0 , sal_True ) ; - pSeq = &aSeq ; - } - } - return *pSeq ; + return theX509Certificate_MSCryptImplUnoTunnelId::get().getSeq(); } /* XUnoTunnel extension */ |