CLTLS(1)
β¨ CLTLS(1) β¨
okay bestie, welcome to the Cryptlib Tools manual page for cltls β she's a secure little command-line queen who opens TLS sessions to the hosts you pick π
πΈ NAME πΈ
cltls β the secure command-line tool that establishes TLS sessions to selected hosts π«Ά
π SYNOPSIS π
cltls [OPTIONS] GET https://servername/path/to/resource[?query]
cltls [OPTIONS] GET servername /path/to/resource[?query]
cltls [OPTIONS] PUT https://servername/path/to/resource[?query] file
cltls [OPTIONS] PUT servername /path/to/resource[?query] file
cltls [OPTIONS] STORE servername
π¦ DESCRIPTION π¦
So cltls opens a TLS-1.2 session β or, if that one flops, a TLS-1.3 session (but only if TLS-1.3 is allowed, no cap) β to a server you chose, and then it either pulls any amount of data from that server (GET) or uploads the binary content of a file to that server (PUT). iconic behavior honestly.
Now here's the tea, and it's important tea. cltls runs on the assumption that the public key infrastructure browsers use cannot always be trusted, because of a bunch of inherent problems with the PKI. π
First: the sheer number of CAs that browsers trust means there's a real risk of a rogue actor issuing a fake certificate for a web server. Generally, any CA can issue a certificate for any web server domain. Meanwhile cltls is built to restrict the number of trusted CAs to a very limited set of CAs that are positively known to work securely. And this set of trusted CAs is under the end-user's sole control. π
Second: some organisations or institutions use their own (self-signed) web server certificates and want to restrict TLS data transfer to members of their own organisation or institution. With cltls the trusted use of internal web servers can be configured easily, which makes the use of any public key infrastructure completely obsolete. slay.
There are two different authentication methods cltls uses to decide whether a TLS connection to a server will be established successfully:
- If the (SHA-2) fingerprint value of the server's certificate is found in the end-user's home directory under the server's domain name, the TLS session to the client will only be opened if the server presents exactly this certificate during the handshake β avoiding the use of any form of PKI entirely.
- The fingerprints (and certificates) can be stored with the
STOREcommand in the user's home directory, but the verification of the certificate's validity must be performed with out-of-band first-hand knowledge. The server's name (or IP address) must be part of the certificate and it must match the server name given on the command line.
If there is no fingerprint value to be found, cltls tries to establish a TLS session and the certificate the server presents during the handshake then gets checked against one of the CA root certificates stored in the end-user's home directory. If this check fails, or the relevant CA root certificate isn't available, the TLS session terminates with the return code 3 (ERR_UNTRUSTED). π
With these two mechanisms, fine-grained control over which servers can be accessed by the client is guaranteed β as opposed to indistinguishably trusting any server certificate with the widely-used PKI built into the operating system. not that.
When both authentication methods have failed and the option -ask is used, the end-user is asked on the terminal to confirm (or deny) that the connection to this unauthenticated server shall continue. π
With the GET command, the data being retrieved from the selected server will be saved in a file under the directory ./servername, replicating the directory structure on the server. This default can be changed with the option -stdout in connection with -silent, so that the data will be written to stdout exclusively. β¨
With the option -noout the received data will not be written to the file system at all β which is needed if only the connection information is being tested. π§
π OPTIONS π
-helpβ displays usage information and exits. short and sweet, we love her.-silentβ prints logging information into a log file instead of stdout. π€«-stdoutβ writes received bytes to stdout instead of writing to a file.-nooutβ prevents writing of received bytes to a file.-ltsor-LTSβ tries only to connect using TLS-1.2 with long term support. (default is off) see:https://www.ietf.org/archive/id/draft-gutmann-tls-lts-17.html-redirectβ allows redirection to a resource on the same already authenticated server. (default is no redirection)-debugβ prints debugging information to stderr. π
π FILES π
$HOME/.cryptlib/certs/ServerName.hashβ the 64 bytes SHA-2 fingerprint value of the server's certificate, as a hexadecimal string. The existence of such a file disables all certificate checks. This method should only be used if the server's certificate does not change frequently and has been verified reliably with out-of-band information. β οΈ
If the hash file does not exist, cltls checks the validity of the certificate during the TLS handshake.
$HOME/.cryptlib/certs/trusted/IssuerName.certor$HOME/.cryptlib/certs/trusted/IssuerName.pemβ a root CA's certificate, which is needed for the web server authentication when no fingerprint is available. TheIssuerNameis taken from the last issuer DN in the certificate chain, and all space bytes are deleted from the DN. π$HOME/.cryptlib/debug/cltls.logβ holds the program's logging information when the option-silentis used. (redirected from stdout)$HOME/.cryptlib/cltls/result.headerand$HOME/.cryptlib/cltls/result.dataβ separate header and data files that have been received from an authenticated server. π«Ά./servername/path/to/resourceβ file name that is used to store the binary data being received with theGETcommand. If the user has no permission to write to./,$HOME/.cryptlib/cltlsis used to store the data./lib64/libcl.so.3.4.9β the cryptlib library. π/usr/lib/python3.1x/site-packages/cryptlib_py.soβ bindings to the cryptlib library used bypython3.
π BUGS π
Please report bugs to innovation@senderek.ie β she wants to hear from you fr fr. π
π AUTHORS π
cltls is written by Ralf Senderek <innovation@senderek.ie>. Cryptlib is written and maintained by Peter Gutmann <pgut001@cs.auckland.ac.nz>
β COPYRIGHT β
Copyright Β© 2025 - 2026 Ralf Senderek. All rights reserved.
License BSD-3-Clause: <https://senderek.ie/cryptlib/bsd.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. π«‘
π₯ SEE ALSO π₯
cryptlib, clkeys, claes, clrsa, clsmime
and that's the whole page bestie, every last crumb of it π no skipping, no summarizing, we keep ALL the details in this house.
β¨ mwah β¨ this has been CLTLS(1) from the Cryptlib Tools collection, dated July 2026 β go be a main character with your TLS sessions, and remember: verify out-of-band or it didn't happen ππ¦
π¦ where this page comes from
- fedora 43: cryptlib-tools 3.4.9.3-1.fc43
- fedora 43: cryptlib-tools 3.4.9.6-1.fc43 Β· Sleepycat and OpenSSL and BSD-3-Clause
- fedora 44: cryptlib-tools 3.4.9.3-1.fc44
- fedora 44: cryptlib-tools 3.4.9.6-1.fc44 Β· Sleepycat and OpenSSL and BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms