[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - 5 commits - neon/makefile.mk neon/neon.patch neon/neon_win32_root_certs.patch ucb/source

Tor Lillqvist tlillqvist at suse.com
Thu Mar 14 12:00:56 PDT 2013


 neon/makefile.mk                        |    2 -
 neon/neon.patch                         |    6 ++-
 neon/neon_win32_root_certs.patch        |   58 ++++++++++++++++++++++++++++++++
 ucb/source/ucp/webdav/NeonSession.cxx   |    7 ++-
 ucb/source/ucp/webdav/webdavcontent.cxx |    6 +++
 5 files changed, 75 insertions(+), 4 deletions(-)

New commits:
commit 63fb9eef9b9de18495956110096a80700bb8889f
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Mar 14 20:51:24 2013 +0200

    Lock document that is opened for potential modification
    
    Part of fix for bnc#805901. Seems to work, can it really be this
    simple...
    
    Change-Id: Ib00c9a973556724f033f843961425dd611797eed

diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 88e2d9b..cf96666 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -506,6 +506,12 @@ uno::Any SAL_CALL Content::execute(
         }
 
         aRet = open( aOpenCommand, Environment );
+#if 1
+        if ( (aOpenCommand.Mode == ucb::OpenMode::DOCUMENT ||
+              aOpenCommand.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE) &&
+             supportsExclusiveWriteLock( Environment ) )
+            lock( Environment );
+#endif
     }
     else if ( aCommand.Name == "insert" )
     {
commit 78716219df74f4eee573c9ae98ea7d05d15d0e5e
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Mar 14 20:49:20 2013 +0200

    Call ne_ssl_trust_default_ca()
    
    Part of fix for bnc#805901.
    
    Change-Id: I5d330a808ce9a4285d1d7c92bc3df91b993a3c7e

diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index d35a4df..b21dab9 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -782,6 +782,8 @@ void NeonSession::Init()
             // Set a failure callback for certificate check
             ne_ssl_set_verify(
                 m_pHttpSession, NeonSession_CertificationNotify, this);
+
+            ne_ssl_trust_default_ca(m_pHttpSession);
         }
 
         // Add hooks (i.e. for adding additional headers to the request)
commit 823980eafc14607876b525cf62b0c4b2778ff6d6
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Mar 14 20:47:12 2013 +0200

    Turn on Neon debug output (if enabled in Neon) when building for debugging
    
    Also add NE_DBG_LOCKS and NE_DBG_SSL to the debugging mask.
    
    Change-Id: I6757954ea3ad53df855935930de176c222bff0ed

diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index 18271b4..d35a4df 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -703,7 +703,7 @@ void NeonSession::Init()
             // #122205# - libxml2 needs to be initialized once if used by
             // multithreaded programs like OOo.
             xmlInitParser();
-#if 0
+#if OSL_DEBUG_LEVEL > 0
             // for more debug flags see ne_utils.h; NE_DEBUGGING must be defined
             // while compiling neon in order to actually activate neon debug
             // output.
@@ -713,7 +713,8 @@ void NeonSession::Init()
                            // | NE_DBG_HTTPAUTH
                            // | NE_DBG_XML
                            // | NE_DBG_XMLPARSE
-                           // | NE_DBG_LOCKS
+                           | NE_DBG_LOCKS
+                           | NE_DBG_SSL
                          );
 #endif
             m_bGlobalsInited = true;
commit 11aa71c442da422999befbcee79fe1c0c0e7e194
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Mar 14 20:41:38 2013 +0200

    Use the system root certificates in ne_ssl_trust_default_ca() on Windows
    
    Part of fix for bnc#805901.
    
    Change-Id: Ic0963285eca4e06d60a02746c022c60ae33b0e0e

diff --git a/neon/makefile.mk b/neon/makefile.mk
index bf5b302..42e1f16 100644
--- a/neon/makefile.mk
+++ b/neon/makefile.mk
@@ -53,7 +53,7 @@ TARFILE_MD5=ff369e69ef0f0143beb5626164e87ae2
 PATCH_FILES=neon.patch neon_ne_set_request_flag.patch
 
 .IF "$(GUI)"=="WNT"
-    PATCH_FILES+=neon_exports_win.patch
+    PATCH_FILES+=neon_exports_win.patch neon_win32_root_certs.patch
 .ELSE
     PATCH_FILES+=neon_exports_unix.patch
 .ENDIF
diff --git a/neon/neon_win32_root_certs.patch b/neon/neon_win32_root_certs.patch
new file mode 100644
index 0000000..a4d9151
--- /dev/null
+++ b/neon/neon_win32_root_certs.patch
@@ -0,0 +1,58 @@
+--- misc/neon-0.29.5/src/ne_openssl.c
++++ misc/build/neon-0.29.5/src/ne_openssl.c
+@@ -41,6 +41,13 @@
+ #include <pthread.h>
+ #endif
+ 
++#ifdef WIN32
++#define X509_NAME WIN32_X509_NAME
++#include <windows.h>
++#include <wincrypt.h>
++#undef X509_NAME
++#endif
++
+ #include "ne_ssl.h"
+ #include "ne_string.h"
+ #include "ne_session.h"
+@@ -798,6 +798,31 @@
+     X509_STORE_load_locations(store, NE_SSL_CA_BUNDLE, NULL);
+ #else
+     X509_STORE_set_default_paths(store);
++#ifdef WIN32
++    {
++	HCERTSTORE hStore;
++	PCCERT_CONTEXT pContext = NULL;
++	X509 *x509;
++
++	hStore = CertOpenSystemStore(0, "ROOT");
++	if (hStore)
++	{
++	    while (pContext = CertEnumCertificatesInStore(hStore, pContext))
++	    {
++		x509 = d2i_X509(NULL, &pContext->pbCertEncoded, pContext->cbCertEncoded);
++		if (x509)
++		{
++		    X509_STORE_add_cert(store, x509);
++		    X509_free(x509);
++		}
++	    }
++	}
++
++	CertFreeCertificateContext(pContext);
++	CertCloseStore(hStore, 0);
++    }
++#endif
++
+ #endif
+ }
+ 
+--- misc/neon-0.29.5/src/makefile.mk
++++ misc/build/neon-0.29.5/src/makefile.mk
+@@ -80,6 +80,7 @@
+ .IF "$(GUI)"=="WNT"
+ 	SHL1STDLIBS+= $(WS2_32LIB)
+ 	SHL1STDLIBS+= $(OPENSSLLIB)
++	SHL1STDLIBS+= crypt32.lib
+ .ELSE # WNT
+ 	.IF "$(OS)"=="SOLARIS"
+ 		SHL1STDLIBS+= -lnsl -lsocket -ldl
commit a4f6bb6e5b514978951dee10b6d334a8111c0663
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Mar 14 20:32:07 2013 +0200

    When debugging, define NE_DEBUGGING
    
    Change-Id: I5cffa50141481094e5622f6812783e2203efb1d6

diff --git a/neon/neon.patch b/neon/neon.patch
index b7a3f85..3521b51 100644
--- a/neon/neon.patch
+++ b/neon/neon.patch
@@ -492,7 +492,7 @@
 +#endif
 --- misc/neon-0.29.5/src/makefile.mk	2011-02-03 10:32:38.000000000 +0100
 +++ misc/build/neon-0.29.5/src/makefile.mk	2011-02-03 10:26:19.000000000 +0100
-@@ -1,1 +1,96 @@
+@@ -1,1 +1,100 @@
 -dummy
 +PRJ=..$/..$/..$/..$/..
 +
@@ -519,6 +519,10 @@
 +CFLAGS+= -I$(SOLARINCDIR)$/$(LIBXMLINCDIR)
 +.ENDIF
 +
++.IF "$(debug)" == "TRUE"
++CFLAGS+=-DNE_DEBUGGING
++.ENDIF
++
 +.IF "$(SYSTEM_OPENSSL)" == "YES"
 +CFLAGS+= $(OPENSSL_CFLAGS)
 +.ENDIF


More information about the Libreoffice-commits mailing list