Contents

Objective

The objective of this guide is to instruct the user who uses the "Transfer Area" feature to post documents in HTTPS environment.

 

Introduction

In communications with any web application (HTTPS) through a Java application (Web or Desktop), an inconsistency may occur in which the Java application attempts to communicate with the site through HTTPS, as it does not have an SSL certificate associated with it. To troubleshoot, follow the steps below. the procedure must be performed on each of the client’s station.

Figure 1 - Error message when there is no valid certificate.



Icon

This guide has been specially written for Java 7.

 

Certificate Download

The first step is to download the SSL certificate for the desired website, that is, the website to which you want to connect through java, by using HTTPS. The certificate can be easily downloaded through a browser. In the case of Chromeafter opening the Fluig address, follow the instructions below:

 

  • Click the Padlock Icon located in the address bar.
  • In the Connection tab click on Certificate information, as shown in the following image:

Figure 2 - Screen with the information of URL accessed

 

 

  • On the certificate screen, access the Details tab and click on Copy to File..., as shown in the following image :

Figure 3 - Screen with the details of the certificate

 

 

  • On the Certificate Export Wizard screen, click Next until you reach the Image 5 screen, referring to the Export File Format:

Figure 4 - Certificate Export Wizard screen


Figure 5 -Certificate export wizard screen


Figure 6 - Certificate Export Wizard screen

 

 

  • After defining the name and location to export the .CER file, proceed and click Finish, as shown in the following image:

Figure 7 - Certificate Export Wizard screen



Certificate Installation

The next step is to install the certificate in the local certificate base of java. Usually located at: <JAVAHOME>/jre7/lib/security/cacerts

Note

Icon

If you are working in Windows, you have to execute cmd.exe in administrator mode, so that the process may continue.


  • Open the command line terminal and execute:
keytool -importcert -trustcacerts -alias <apelido> -file <caminho para o certificado .crt> -keystore <caminho para o cacerts> -storepass changeit

 

The parameters of the command above should be amended as follows:

Parameter

Description

<apelido>

Enter the name to identify the certificate to be installed on the base

<caminho para o certificado .crt>

Enter the path in which the certificate was saved

<caminho para o cacerts>

Enter the location in <JAVAHOME>/jre7/lib/security/cacerts

-storepass changeit “changeit” is the default password for manipulating the Java certificates base. It should not be changed.

 

  • After executing and confirming the previous command, the certificate will be installed in the local certificate base of Java. Details of the imported certificate will be displayed, a shown in Figure 8:

Figure 8 - Certificate details screen


It is not necessary to reboot the machine after executing the above procedures, although we recommend restarting the browser.