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

New commits:
commit 7ead068be9f865327da7aef1cdc01614f25fc4a6
Author: Markus Mohrhard <markus.mohrh...@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

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx 
b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 531d716..1ed0b70 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -269,6 +269,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.isEmpty() )
     {
@@ -280,10 +281,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 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to