diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-05-04 15:12:21 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-05-04 15:13:53 +0200 |
commit | 7ead068be9f865327da7aef1cdc01614f25fc4a6 (patch) | |
tree | f6863f2f66faefe9756661698c33c43d0a870a85 | |
parent | ffc198fb645f13a14e64eeb4e7067c42e97f4b63 (diff) |
more robust nss initialization, related fdo#45171
fall back to without profile if path is invalid or profile does not
exist
Change-Id: Ic9a73fbaaa288f8bc99dab2b1d679c2cbe6baa89
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 531d71638c1d..1ed0b7006a36 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 ) |