4D v16.3

HTTP SET CERTIFICATES FOLDER

Home

 
4D v16.3
HTTP SET CERTIFICATES FOLDER

HTTP SET CERTIFICATES FOLDER 


 

HTTP SET CERTIFICATES FOLDER ( certificatesFolder ) 
Parameter Type   Description
certificatesFolder  Text in Pathname and name of client certificates folder

The HTTP SET CERTIFICATES FOLDER command modifies the active client certificates folder for all processes of the current session.

The client certificates folder is the one where 4D looks for the client certificate files that are required by Web servers. By default, as long as the HTTP SET CERTIFICATES FOLDER command is not executed, 4D uses a folder named "ClientCertificatesFolder" that is created next to the structure file. This folder is only created when necessary.

 In 4D v14, it is now possible to use several client certificates.

In certificatesFolder, pass the pathname of the custom folder containing the client certificates. You can pass either a pathname relative to the application structure file, or an absolute pathname. The path must be expressed using the system syntax, for example:

  • (OS X): Disk:Applications:myserv:folder
  • (Windows): C:\Applications\myserv\folder

Once this command has been executed, the new path is immediately taken into account by commands such as HTTP Request that are executed later on (you do not have to restart the application). It is used in all the processes of the database.

If the folder specified does not exist at the location defined, or if the pathname passed in certificatesFolder is not valid, an error is generated. You can intercept this error using an error-handling method installed by the ON ERR CALL command.

As described in the Using TLS Protocol section, SSL certificates managed by 4D must be in the PEM format. If your certificate provider (for example, startssl) sends you a certificate that is in a binary format such as .crt, .pfx or .p12 (the format also depends on your browser), you have to convert it to PEM format in order to be able to use it. There are Web sites such as sslshopper where you can do this conversion on-line.

Example  

You want to change certificates folder temporarily:

 C_TEXT($certifFolder)
 $certifFolder :=HTTP Get certificates folder //save current folder
 HTTP SET CERTIFICATES FOLDER("C:/temp/certifTempo/")
 ... // execution of specific requests
 HTTP SET CERTIFICATES FOLDER($certifFolder//restore previous folder



See also 

HTTP Get certificates folder

 
PROPERTIES 

Product: 4D
Theme: HTTP Client
Number: 1306

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v14

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)