Update README to add usage output

This commit is contained in:
Cedric Staub
2016-06-21 15:14:56 -07:00
parent b76eb3bf5d
commit 21188373ff
4 changed files with 32 additions and 7 deletions
+29 -4
View File
@@ -24,16 +24,41 @@ We use [glide][1] for managing vendored dependencies.
Certigo can read certificates/keystores in various formats and dump them to stdout.
Currently supported formats are DER, PEM, JCEKS and PKCS12. It's a one-stop shop for debugging/analyzing certs.
Currently supported formats are DER, PEM, JCEKS/JKS and PKCS12. Certigo will display information in a human-readable way, and print warnings for common mistakes (such as small key sizes or weak signatures/hash functions). Certigo can also convert any input to a series of PEM blocks, which is useful if you want to e.g. dump the contents of PKCS12/JCEKS keystores into something more useful.
For example (from stdin):
```
usage: certigo [<flags>] <command> [<args> ...]
A command line certificate examination utility.
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--version Show application version.
Commands:
help [<command>...]
Show help.
dump [<flags>] [<file>...]
Display information about a certificate.
connect [<flags>] [<server:port>]
Connect to a server and print its certificate.
pem [<flags>] [<file>...]
Convert input to PEM-formatted blocks.
```
### Examples
Display information about a certificate (from stdin):
<img src="https://cdn.rawgit.com/square/certigo/master/examples/example_1_245953.svg" width="100%" height="100%">
Or from a file:
Display information about a certificate (from a file):
<img src="https://cdn.rawgit.com/square/certigo/master/examples/example_2_d848d5.svg" width="100%" height="100%">
You can dump a cert chain from a TLS server. Unlike `openssl x509 -text`, certigo will dump the entire chain, not just the first certificate:
Display information about a certificate from a remote server:
<img src="https://cdn.rawgit.com/square/certigo/master/examples/example_3_ffafad.svg" width="100%" height="100%">
+1 -1
View File
@@ -6,7 +6,7 @@
viewBox="0 0 60 51.4">
<rect x="0" y="0" width="100%" height="100%" fill="#f7f7f7" stroke-width="2" />
<text font-family="monospace" font-size="1">
<tspan x="0.5" dy="1.2">&#36; cat certs/cert.pem | ./certigo dump</tspan>
<tspan x="0.5" dy="1.2">&#36; certigo dump &#60; cert.pem</tspan>
<tspan x="0.5" dy="1.2">** CERTIFICATE 1 **</tspan>
<tspan x="0.5" dy="1.2">Serial: 11578389349061131131</tspan>
<tspan x="0.5" dy="1.2">Not Before: <tspan fill="green">2016-05-27 21:15:31 +0000 UTC</tspan></tspan>

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

+1 -1
View File
@@ -6,7 +6,7 @@
viewBox="0 0 60 55">
<rect x="0" y="0" width="100%" height="100%" fill="#f7f7f7" stroke-width="2"/>
<text font-family="monospace" font-size="1">
<tspan x="0.5" dy="1.2">&#36; ./certigo dump certs/cert.jks</tspan>
<tspan x="0.5" dy="1.2">&#36; certigo dump keystore.jceks</tspan>
<tspan x="0.5" dy="1.2">Enter password:</tspan>
<tspan x="0.5" dy="1.2">** CERTIFICATE 1 **</tspan>
<tspan x="0.5" dy="1.2">Alias: second-key</tspan>

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

+1 -1
View File
@@ -9,7 +9,7 @@
<rect x="0" y="0" width="99%" height="100%"/>
</clipPath>
<text font-family="monospace" font-size="1" clip-path="url(#rect)">
<tspan x="0.5" dy="1.2">&#36; ./certigo connect squareup.com:443</tspan>
<tspan x="0.5" dy="1.2">&#36; certigo connect squareup.com:443</tspan>
<tspan x="0.5" dy="1.2">** CERTIFICATE 1 **</tspan>
<tspan x="0.5" dy="1.2">Serial: 1413474646</tspan>
<tspan x="0.5" dy="1.2">Not Before: <tspan fill="green">2014-12-22 20:28:37 +0000 UTC</tspan></tspan>

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB