FairCom's ISQL utility allows you to run SQL scripts and execute SQL interactively from the command line. You can use TLS to connect ISQL to a FairCom server using the -S switch.
For TLS without peer Authentication
isql -u admin -p ADMIN -S 6597@localhost:ctreeSQLFor TLS with peer authentication
You need to specify the server's CA certificate in a PEM-formatted file:
isql -u admin -p ADMIN -S c:\my\certs\ca.crt 6597@localhost:ctreeSQLTLS with client certificate authentication is possible with the additional configuration steps documented in Use client certificate authentication in client software.
- Set environment variable
CTSSL_CLIENT_CERTIFICATEto identify the user certificate you want to be authenticated. The user certificate must be followed by the CA certificate in the specified file. Certificates generated usingcreateclientcert.pyalready contain the CA certificate:set CTSSL_CLIENT_CERTIFICATE=c:\my\certs\my_user.pem - (optional) Set the environment variable
CTSSL_CLIENT_KEYto identify the user private key that corresponds to theCTSSL_CLIENT_CERTIFICATE. Certificates generated usingcreateclientcert.pycontain the private key by default, so you can skip this step:set CTSSL_CLIENT_KEY=c:\my\keys\my_user.key - (optional) Set the environment variable to log client-side SSL errors to a log file of your choosing:
set CTSSL_DEBUG_LOG=c:\my\logs\my_tls.log - ISQL still requires a username and password, but these are ignored by the server. Run:
isql -u none -p none -S c:\my\certs\ca.crt 6597@localhost:ctreeSQL - If the private key is encrypted, you will be prompted for the password.