summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-06-20 12:37:28 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-06-21 11:32:40 +0200
commit1f0b455de6df8fc2b215a0398da385e5e2e6905c (patch)
tree0e42b1daaa3405a58302aff4f7d256eef96fbbda
parentdcaf9c147a1cfea268db49952171338555379794 (diff)
libcmis: don't retry if the connection failed at TLS level
... for example due to bad certificate; it is pointless as it will fail exactly the same way. Change-Id: I654261b2691987453e4ac9a3e2f3019dce20da48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169268 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins (cherry picked from commit af79ac4bf4a27e2d77e60b64049de21102a8ba85) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169286
-rw-r--r--external/libcmis/UnpackedTarball_libcmis.mk1
-rw-r--r--external/libcmis/factory-no-retry-ssl.patch.117
2 files changed, 18 insertions, 0 deletions
diff --git a/external/libcmis/UnpackedTarball_libcmis.mk b/external/libcmis/UnpackedTarball_libcmis.mk
index d13b8cd463b1..4a0a1a5e9e03 100644
--- a/external/libcmis/UnpackedTarball_libcmis.mk
+++ b/external/libcmis/UnpackedTarball_libcmis.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libcmis,\
external/libcmis/0001-cid-1545775-COPY_INSTEAD_OF_MOVE.patch \
external/libcmis/0001-Fix-warning-C4589-when-building-with-MSVC.patch \
external/libcmis/http-session-cleanup.patch.1 \
+ external/libcmis/factory-no-retry-ssl.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libcmis/factory-no-retry-ssl.patch.1 b/external/libcmis/factory-no-retry-ssl.patch.1
new file mode 100644
index 000000000000..e549ca5e08c8
--- /dev/null
+++ b/external/libcmis/factory-no-retry-ssl.patch.1
@@ -0,0 +1,17 @@
+--- libcmis/src/libcmis/session-factory.cxx.orig 2024-06-19 18:43:56.244832053 +0200
++++ libcmis/src/libcmis/session-factory.cxx 2024-06-20 11:46:26.518263605 +0200
+@@ -94,8 +94,13 @@
+ {
+ response = httpSession->httpGetRequest( bindingUrl );
+ }
+- catch ( const CurlException& )
++ catch (const CurlException& e)
+ {
++ if (strcmp(e.what(), "Invalid SSL certificate") == 0)
++ {
++ // no point in trying other protocols
++ throw e.getCmisException();
++ }
+ // Could be SharePoint - needs NTLM authentication
+ session = new SharePointSession( bindingUrl, username,
+ password, verbose );