[Libreoffice-commits] .: Branch 'libreoffice-3-5' - xmlsecurity/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri May 4 09:00:18 PDT 2012


 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit bf9ab0b486ee336bd4fb91e5ad2320d25593d696
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri May 4 15:12:21 2012 +0200

    more robust nss initialization, related fdo#45171
    
    fall back to without profile if path is invalid or profile does not
    exist
    
    Change-Id: Ic9a73fbaaa288f8bc99dab2b1d679c2cbe6baa89
    (cherry picked from commit 7ead068be9f865327da7aef1cdc01614f25fc4a6)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 2090235..3383aaf 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -261,6 +261,7 @@ bool nsscrypto_initialize( const css::uno::Reference< css::lang::XMultiServiceFa
 
     PR_Init( PR_USER_THREAD, PR_PRIORITY_NORMAL, 1 ) ;
 
+    bool bSuccess = true;
     // there might be no profile
     if ( sCertDir.getLength() > 0 )
     {
@@ -272,10 +273,11 @@ bool nsscrypto_initialize( const css::uno::Reference< css::lang::XMultiServiceFa
             PR_GetErrorText(error);
             if (error)
                 xmlsec_trace("%s",error);
-            return false ;
+            bSuccess = false;
         }
     }
-    else
+
+    if( sCertDir.isEmpty() || !bSuccess )
     {
         xmlsec_trace("Initializing NSS without profile.");
         if ( NSS_NoDB_Init(NULL) != SECSuccess )


More information about the Libreoffice-commits mailing list