Step 1: Trust SharePoint's SSL Certificate

If you purchased a certificate from a trusted certificate authority, then your certificate is already trusted by the Confluence server and you can skip this step. Go to step 2 below. If you generated your own certificate or obtained one from a less well-known certificate authority, please follow the steps below.

To configure Confluence to trust the certificate on your SharePoint server, you must add the certificate's public key to the Java runtime's Certificate Authority keystore as described below.

Step 1.1: Create a .cer File

The certificate's public key must be imported into the Java keystore as a certificate file in .cer file format. If you already have a .cer file you can skip this step and go to step 1.2 below. If you only have a .pfx file and need to create the .cer file, read on!

A simple way to create the required file is to import and export the certificate in and out of the Windows certificate store. This works because the export operation allows you to choose the export format.

The first step is to import the certificate into Windows:

  1. Using a Windows computer, open the Microsoft Management Console by clicking the 'Start' button, selecting 'Run' and then running the command 'mmc.exe'.
  2. In the Microsoft Management Console, select 'Add/Remove Snap-in...' from the 'File' menu.
  3. Click ''Add....
  4. Highlight the 'Certificates' snap-in from the list and click 'Add'.
  5. Ensure that 'My user account' is selected and then click 'Finish'.
  6. Click 'Close'.
  7. Click 'OK'.
  8. Expand the tree from 'Console Root' to 'Certificates - Current User' to 'Personal'.
  9. Right-click 'Personal' and select 'Import...' from the 'All Tasks' menu.
  10. When the 'Certificate Import Wizard' is displayed, click 'Next'.

    Screenshot: The certificate import wizard

  11. Click 'Browse...' and select the .pfx certificate file. (You may need to set the 'Files of type' filter to 'Personal Information Exchange (.pfx, *.p12)*'.
  12. Click 'Next'.
  13. Enter the 'Password' for the certificate.
  14. Ensure that the 'Mark this key as exportable' option is selected.
  15. Click 'Next'.
  16. Click 'Next'.
  17. Click 'Finish'.

At this point, your certificate should appear in the 'Personal' folder of the 'Certificates' snap-in.

Screenshot: Personal certificates

Now you can export the certificate in the desired .cer format:

  1. Right-click the certificate and select 'Export...' from the 'All Tasks' menu.
  2. When the Certificate Export Wizard opens, click 'Next'.
  3. Ensure that the 'No, do not export the private key' option is selected.
  4. Click 'Next'.
  5. Ensure that the 'DER encoded binary X.509 (.CER)' option is selected.
  6. Click 'Next'.
  7. Enter a 'File name' for the exported certificate (such as '{{}}C:\cert.cer').
  8. Click 'Next'.
  9. Click 'Finish'.

Step 1.2: Import the .cer File onto the Confluence Server

We have provided a batch script (see below) for Windows environments. If you are running Confluence on UNIX, please perform the import manually. The batch script uses the Java runtime's keytool command to import the certificate into the required location on the Confluence server. The script will add the certificate to the root Java Secure Sockets Extensions keystore, which is located in your Java Runtime Enviroment's (JRE's) lib\security directory with the name jssecacerts. This is the required location in order for the certificate to be trusted by Confluence.

This script assumes the following about your environment:

  • You are using a Confluence stand-alone installation running on the Sun JVM.
  • Your %JAVA_HOME% environment variable has been set correctly.
  • You have copied the .cer file created in step 1.1 above to the C: drive of your Confluence server.

Copy and execute this batch script (Windows) to add the certificate to the keystore:

@echo off
set keytool="%JAVA_HOME%\bin\keytool.exe"
set keystore="%JAVA_HOME%\jre\lib\security\jssecacerts"
set certificatefile=C:\sharepoint.cer

%keytool% -import -alias sharepoint -keystore %keystore% -storepass changeit -file %certificatefile%

Step 2: Configure the Alternative URL in Confluence

The final step is to configure your Confluence server to communicate via the new URL you have set up.

The content of this page is hidden from view. To see it, edit the page or view the wiki markup.

See Access SharePoint using Basic Authentication and SSL (via Alternative Access URL) with SP 2007 and Access SharePoint using Basic Authentication and SSL (via Alternative Access URL) with SP 2010.