-
Notifications
You must be signed in to change notification settings - Fork 2
add user guide and faq #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||
| # FAQ | ||||||
|
|
||||||
| ## How is sslx different from openssl? | ||||||
|
|
||||||
| openssl is a cryptographic library with a CLI bolted on. It does everything (TLS, symmetric crypto, PKCS, ASN.1, etc) but the CLI syntax is inconsistent and hard to remember. | ||||||
|
|
||||||
| sslx only does certificate and TLS operations. It's a single binary with consistent flags, colored output, and commands you can actually remember. | ||||||
|
|
||||||
| sslx also does things openssl can't do from the CLI, like TLS grading (A+ to F), multi-host expiry checks, and JWT decoding. | ||||||
|
|
||||||
| ## How is sslx different from step-cli? | ||||||
|
|
||||||
| step-cli is a full PKI toolkit with an ACME server, SSH certificates, OIDC token handling, and more. It's 80MB+ and has a lot of features most people don't need. | ||||||
|
|
||||||
| sslx is smaller (4MB), focused on the common tasks, and doesn't require any setup. If you need a CA server or SSH certificates, use step. If you just want to check a cert or grade a TLS connection, sslx is faster to reach for. | ||||||
|
|
||||||
| ## How is sslx different from mkcert? | ||||||
|
|
||||||
| mkcert does one thing: generate locally-trusted certificates for development. It's great at that. | ||||||
|
|
||||||
| sslx generates self-signed certs too (sslx generate), but it also inspects, connects, grades, converts, and checks expiry. If you need mkcert's trust store integration (installing a root CA into your browser), use mkcert. sslx might add that in a future version. | ||||||
|
|
||||||
| ## Does sslx use OpenSSL? | ||||||
|
|
||||||
| No. sslx is built with rustls, a TLS library written in Rust. There's no dependency on system OpenSSL at all. The binary is fully static and works the same everywhere. | ||||||
|
||||||
| No. sslx is built with rustls, a TLS library written in Rust. There's no dependency on system OpenSSL at all. The binary is fully static and works the same everywhere. | |
| No. sslx is built with rustls, a TLS library written in Rust. There's no dependency on system OpenSSL at all, and sslx behaves consistently across supported platforms. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,198 @@ | ||||||||||||||||||||||||||||
| # User Guide | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| This covers the main workflows. Run `sslx --help` or `sslx <command> --help` for full flag details. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Checking a live server | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ### Quick look | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| sslx connect example.com | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Shows the TLS version, cipher suite, ALPN protocol, and the full certificate chain. Default port is 443. Use `host:port` for other ports: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| sslx connect mail.example.com:587 | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ### TLS grade | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| sslx grade example.com | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Checks protocol version, cipher strength, certificate validity, key type, hostname matching, chain completeness, and ALPN. Scores from A+ to F. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Use `--json` to get the grade programmatically: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| sslx grade example.com --json | jq '.grade' | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ### Expiry monitoring | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Check multiple hosts at once: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| sslx expiry host1.example.com host2.example.com host3.example.com | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Exit code is 1 if any cert expires within 7 days. Put this in a cron job: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| # check every morning at 8am | ||||||||||||||||||||||||||||
| 0 8 * * * /usr/local/bin/sslx expiry prod.example.com api.example.com || notify-send "cert expiring" | ||||||||||||||||||||||||||||
|
Comment on lines
+41
to
+45
|
||||||||||||||||||||||||||||
| Exit code is 1 if any cert expires within 7 days. Put this in a cron job: | |
| ```bash | |
| # check every morning at 8am | |
| 0 8 * * * /usr/local/bin/sslx expiry prod.example.com api.example.com || notify-send "cert expiring" | |
| Exit code is 1 if any cert expires within 7 days, or if a host check errors (for example DNS, timeout, or TLS handshake failures). Put this in a cron job: | |
| ```bash | |
| # check every morning at 8am | |
| 0 8 * * * /usr/local/bin/sslx expiry prod.example.com api.example.com || notify-send "cert expiring or host check failed" |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exit-codes table isn’t valid Markdown: the header/rows start with || instead of |, which typically won’t render as a table. Replace the leading || with a single | on each row (and keep the separator row consistent).
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This table documents global meanings for exit codes that don’t match the current implementation. For example, code 4 is never returned (connection failures bubble up as an error and main exits with 10), and code 5 is only used by decode when it can’t detect a format (most other “bad file/format” cases also exit 10). Consider either updating the docs to reflect per-command exit codes, or updating the CLI to consistently use the documented codes.
| | 1 | cert expired or expiring soon | | |
| | 3 | chain untrusted or incomplete | | |
| | 4 | connection failed | | |
| | 5 | file format error | | |
| | 10 | bad arguments | | |
| These work with set -e in shell scripts and CI pipelines. | |
| | 10 | bad arguments / invalid usage | | |
| Some commands may return other non-zero exit codes for command-specific conditions, but those codes are not consistent across all commands. | |
| If you need command-level behavior, check `sslx <command> --help` and test that command directly in scripts. | |
| These work with `set -e` in shell scripts and CI pipelines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section says “sslx only does certificate and TLS operations”, but the very next paragraph lists JWT decoding as a feature. Consider rephrasing to something like “focused on TLS/cert workflows (plus a few related helpers like JWT decoding)” to avoid a self-contradiction.