Skip to main content

Configure SSL

Learn how to configure the Pdftools Licensing Gateway Service (LGS) to use the SSL and create HTTPS communication for your license key validation.

info

Before configuring SSL with the LGS, review Configure the LGS section.

SSL configuration

To enable SSL compatibility with LGS, follow these steps depending on your operating system:

  1. Find the appsettings.json LGS configuration file. It is located in the installation folder. For example:
    C:\Program Files\Pdftools\Licensing Gateway Service\appsettings.json
  2. Add the following keys to your configuration file.
    • Specify the port where SSL communication occurs:
      LicensingServiceHTTPSPortNumber: 9990
    • Add path to the certificate file:
      CertPemFile: C:/certs/certificate.pem
    • Add path to the private key file:
      CertKeyFile: C:/certs/privatekey.key
      warning

      Include all files and configuration keys mentioned above. If you miss any of them the LGS doesn't activate SSL and defaults to HTTP communication.

  3. Example configuration file:
    {
    "LicensingServicePortNumber": 9999,
    "LogFilePath": "C:/logs/pdftls/log.txt",
    "LogRetentionDays": 7,
    "IsOfflineMode": false,
    "LicensingServiceHTTPSPortNumber": 9990,
    "CertPemFile": "C:/certs/cert.pem",
    "CertKeyFile": "C:/certs/private-key.key"
    }
  4. Restart service after changing configuration by running the following command:
    Stop-Service -Name "Licensing Gateway Service"
    Start-Service -Name "Licensing Gateway Service"

If your configuration is correct, the LGS logs include information similar to:

[Information] Now listening on: "https://[::]:9990"