Apache OpenOffice (AOO) Bugzilla – Issue 127680
webdav https client certificate .p12
Last modified: 2019-07-22 13:37:36 UTC
Hello, I set up a WebDav Server on ubuntu 16.04 with apache 2.4.18 and created a folder to store documents with a Macro like this: Sub SaveFile Dim Doc As Object Dim Url As String Dim FileProp(0) As New com.sun.star.beans.PropertyValue Url = "https://192.168.147.128/webdav/test.sxw" Url = ConvertToUrl(Url) FileProp(0).Name = "Overwrite" FileProp(0).Value = True Doc = Stardesktop.CurrentComponent Doc.storeAsURL(Url, FileProp()) End Sub I Also set up webdav folder to require a certificate from the client but this works perfectly only for browsers and not with openoffice that will crash- Also i would like to know if it's possible to embed the username / password in the url(works with ftp) like this or n any other way Url = "https://username:password@192.168.147.128/webdav/test.sxw" bu it seems not supported Thanks in Advance
Why saving in SXW? This format is outdated. Use ODT and test if the problem still occurs.
Thank you for the reply , i know it's outdated but that's not the problem. The Issue is how macro handles the saving trough https/webdav , Anyway i tried but it doesnt work. I found a way for handling authentication with "com.sun.star.task.XInteractionHandler2" and "com.sun.star.ucb.URLAuthenticationRequest" see https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=66160 Sub SaveFile Dim Doc As Object Dim Url As String Dim oihandler oihandler = CreateUnoListener("InteractionHandler_", "com.sun.star.task.XInteractionHandler2") Dim FileProp(1) As New com.sun.star.beans.PropertyValue Url = "https://192.168.147.128/webdav/test.sxw" Url = ConvertToUrl(Url) FileProp(0).Name = "Overwrite" FileProp(0).Value = True FileProp(1).Name = "InteractionHandler" FileProp(1).Value = oihandler Doc = Stardesktop.CurrentComponent Doc.storeAsURL(Url, FileProp()) End Sub Sub InteractionHandler_handle(req) r = req.getRequest() If CheckExceptionType(r, "com.sun.star.ucb.URLAuthenticationRequest") Then conts = req.getContinuations() for i = 0 to ubound(conts) step 1 cont = conts(i) If HasUnoInterfaces(cont, "com.sun.star.ucb.XInteractionSupplyAuthentication") Then cont.setUserName("username") cont.setPassword(InputVal) cont.select() Exit For End If Next i End If End Sub So the problem here is to understand if i can use a certificate for client Authentication combined with the password supplied by the the user. Is there any exhaustive documentation on this interfaces ?
Did you have an error when you save directly with File > Save as menu?
No news from OP since +1 yr.