WebDAV over HTTPS

If you want to access a WebDAV repository across an insecure network <oXygen/> allows you to load and save the documents over the HTTPS protocol (if the server understands this protocol) so that any data exchange with the WebDAV server is encrypted.

When a WebDAV repository is first accessed over HTTPS the server hosting the repository will present a security certificate to <oXygen/> as part of the HTTPS protocol, without any user intervention. <oXygen/> will use this certificate to decrypt any data stream received from the server. For the authentication to succeed you should make sure the security certificate of the server hosting the repository can be read by <oXygen/>. This means that <oXygen/> can find the certificate in the key store of the Java Runtime Environment in which it runs. You know the server certificate is not in the JRE's key store if you get the error "No trusted certificate found" when trying to access the WebDAV repository:

 

Figure 4.15. The server certificate is not available

The server certificate is not available

You can add a certificate to the key store by exporting it to a local file using any HTTPS-capable Web browser (for example Internet Explorer) and then importing this file into the JRE using the keytool executable bundled with the JRE. The steps are the following using Internet Explorer (if you use other browser the procedure is similar):

 

Procedure 4.5. Import a HTTPS server certificate

  1. Export the certificate into a local file

    1. Point your HTTPS-aware Web browser to the repository URL. If this is your first visit to the repository it will be displayed a security alert stating that the security certificate presented by the server is not trusted.

       

      Figure 4.16. Security alert - untrusted certificate

      Security alert - untrusted certificate
    2. Press the button "View Certificate".

    3. Select the "Details" tab.

    4. Press the button "Copy to file ...". This will start the Certificate Export Wizard on Windows

    5. Follow the indications of the wizard to save the certificate to a local file, for example server.cer .

  2. Import the local file into the JRE running <oXygen/>

    1. Open a text-mode console.

    2. Go to the lib/security subdirectory of your JRE directory, that is of the directory where it is installed the JRE running <oXygen/>, for example on Windows C:\Program Files\Java\j2re1.4.2\lib\security

    3. Run the following command:..\..\bin\keytool.exe -import -trustcacerts -file local-file.cer -keystore cacerts where local-file.cer is the file containing the server certificate, created during the previous step. keytool requires a password before adding the certificate to the JRE keystore. The default password is "changeit". If somebody changed the default password then he is the only one who can perform the import. As a workaround you can delete the cacerts file, re-type the command and enter as password any combination of at least 6 characters. This will set the password for future operations with the key store.

  3. Restart <oXygen/>