ccheck for Mac
ccheck, simple X509 certificate checker with TAP output
ccheck — overview
ccheck, simple X509 certificate checker with TAP output
This tool simplifies handling of PEM certificates. It allows for easy filtering of certificates based on the days until expiration. It's use is reminiscent of the grep utility.
It can produce Test Anything Protocol which makes this tool useful as part of test suites that deal with TLS certificate expiration.
Examples
Errors are sent to STDERR, the listing of certificates that satisfy the given criteria is sent to STDOUT but can be suppressed by using --quiet in the command line. TAP output is triggered by the --tap command line option.
TAP — Test Anything Protocol — support
TAP-formatted test results provide output that can be captured by more elaborate test suites:
JSON support
Output can be produced in JSON. Each spec provided in the command line will generate an entry in an array, with all available test information.
Custom certificate expiration check
Check whether a given certificate will expire _soon_, or within 10,000 days as in this example. Also whether the certificate is valid for the DNS name provided, is applicable:
Specifying 0 days with --min-days disables the expiration checking.
SNI support
When specifying hostnames for remote connections, the desired SNI can be added between parentheses as per the following example:
Certificate validation
By default, ccheck verifies that the certificate is valid for the domain name being used for testing. This can be disabled with the --skip-verify option:
Custom client certificate, custom Root CA processing
The --client-cert and --client-key allows for the specification of a custom client certificate pair.
--root-certs allows for specifying custom root CA certificates for validation of the received server certificate.
Certificates in local PEM files
Certificates can also be placed in local files:
The tests use a local copy of a current Google certificate chain. To quickly get an up-to-date copy, use the following command:
STARTTLS certificate validation
When using the --starttls command line option, ccheck will assume a connection to an ESMTP server and fetch the TLS certificates after issuing the STARTTLS command to start a new TLS session. This is useful to test submission servers as in this example:
PostgreSQL certificate validation
The --postgres command line flag instructs ccheck to treat the connection coordinates as the hostname and port number of a PostgreSQL database server. It then attempts a connection and uses the native line protocol to start a TLS session in which the server certificates are obtained and tested:
In the case above, the TLS certificate does not match the host name, so normal validation fails. If you're simply interested in checking the expiration date, you can add the --skip-verify flag as follows:
Dump certificate chain
The chain command provides a friendly text representation of the certificate chain sent by the TLS server, helpful for auditing certificate lineage.
Details
从命令行检查 X509 证书过期情况,并输出 TAP
How to install ccheck
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2020-03-19; current version v1.0.1, with the latest 1 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| v1.0.1 | 2020-03-19 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- Apple silicon · latest macOS
- Apple silicon · macOS 26 Tahoe
- Apple silicon · macOS 15 Sequoia
- Apple silicon · macOS 14 Sonoma
- Apple silicon · macOS 13 Ventura
- arm64_monterey
- arm64_big_sur
- Intel · macOS 14 Sonoma
- Intel · macOS 13 Ventura
- Intel · macOS 12 Monterey
- big_sur
- Linux · ARM64
- Linux · x86_64
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| ccheck | v1.0.1 | GPL-2.0-or-later | CLI | 0 |
| Command Pad | v0.1.2 | — | Universal binary | 0 |
| colormake | 0.9.20140503 | GPL-2.0-or-later | CLI | 2 |
| hilite | 1.5 | GPL-2.0-or-later | CLI | 1 |
Similar apps: Command-line Tools
Command Pad
Command Pad is a handy GUI application for running your command line tasks.colormake
This is a simple wrapper for making the output from make easier to read (more colorful), and…hilite
hilite is a small utility for command-line users that runs commands and highlights standard…flint-checker
Check your project for common sources of contributor friction.openssl@4
Cryptography and SSL/TLS Toolkitxz
General-purpose data compression with high compression ratioCategories: Command-line Tools