Configure SSL for Hydra.

How to setup SSL

NOTE:On Unix it is normally necessary to have device random installed, this is because SSL uses it to request random data. You can check this is installed by running ls –l /dev/random or –ls /dev/urandom. If it is not installed you will need to install it before SSL will work.

Configuring ‘Hydra4GL’ SSL
You will need to set the following environment variables to set up SSL correctly. These settings refer to $QUERIXDIR/etc/inet.env
QXGUISSL:
Controls whether SSL is turned on in ‘Hydra4GL’.
Example: QXGUISSL=true
QXSSLPASS:
If your private key is password protected, you will need to specify your password here.
Example: QXSSLPASS=MyP@ssW0RD
QXSSLCERTNAME:
Allows the default name and location of your SSL certificate to be overridden.
Example: QXSSLCERTNAME=/usr/Querix/ssl/cert.pem
QXSSLPRIVATEKEYNAME:
Allows the default name and location of your SSL private key to be overridden.
Example:
QXSSLPRIVATEKEYNAME=/usr/Querix/ssl/privatekey.pem
QXSSLENFORCE:
Set this variable to true if you only want to allow SSL connections to this hydra server.
Example: QXSSLENFORCE: true
You use your 4GL code to check whether your GUI connection is using SSL, by checking the environment variable. If QXSSLMODERUNNING if it is set, then SSL is running correctly.

Configuring a Client for SSLThere are 2 ways to turn SSL on when using a supported client.
1) In your client-side script file add the line:
default.sslconnect: true
2) In the Developer Mode connection dialog box of the client, tick the SSL Connection checkbox.
If the certificate has been installed correctly, then SSL communication will now take place with an SSL capable thin-client. This is confirmed by a padlock icon in the status bar of the thin-client.
Environment Settings.
‘HydraStudio’ includes a tool for editing the environment settings that are crucial to compilation and runtime processes. In Querix nearly all the compiler and runtime options are controlled by these environment variables.
To access the environment settings:
1) Click on the “GUI Server” tab at the top of the Project tree region.
2) Double click the Environment icon of the GUI Server for which you want to change the environment settings.
This loads the environment editor into the Editor region:
Each new variable must be created on a new line. To edit an entry simply double-click the required cell.
To add another environment variable click the “Add” button. A new line will be added to the bottom of the list of variables.
To delete a variable, place your cursor on the line of the variable to be deleted, then click the “Delete” button.
Once you have finished editing the environment variables, press the “Save” button to store the new settings.
Further information can be found on this subject from the documentation in your Querix installation directory.
Hydra_env_edit