mirror of
https://github.com/square/certigo.git
synced 2026-10-21 06:45:42 +00:00
Add some colors.
This commit is contained in:
@@ -16,7 +16,7 @@ Note that certigo requires Go 1.6 or later to build.
|
||||
|
||||
### Develop
|
||||
|
||||
We use [glide][1] for managing vendored dependencies.
|
||||
We use [glide][1] for managing vendored dependencies.
|
||||
|
||||
[1]: https://glide.sh
|
||||
|
||||
@@ -28,46 +28,12 @@ Currently supported formats are DER, PEM, JCEKS and PKCS12. It's a one-stop shop
|
||||
|
||||
For example (from stdin):
|
||||
|
||||
$ certigo dump < certificate.pem
|
||||
** CERTIFICATE 1 **
|
||||
Serial: 11578389349061131131
|
||||
Not Before: 2016-05-27 21:15:31 +0000 UTC
|
||||
Not After : 2017-10-09 21:15:31 +0000 UTC
|
||||
Signature algorithm: SHA1-RSA
|
||||
Subject Info:
|
||||
CommonName: ApertureScience
|
||||
Organization: [Aperture Science]
|
||||
OrganizationalUnit: [Research and Development]
|
||||
Country: [US]
|
||||
Locality: [San Francisco]
|
||||
Issuer Info:
|
||||
CommonName: ApertureScience
|
||||
Organization: [Aperture Science]
|
||||
OrganizationalUnit: [Research and Development]
|
||||
Country: [US]
|
||||
Locality: [San Francisco]
|
||||
<img src="https://cdn.rawgit.com/square/certigo/alok/readme/output_1.svg" width="100%" height="100%">
|
||||
|
||||
Or from a file:
|
||||
|
||||
$ certigo dump keystore.jceks
|
||||
Enter password: some-password
|
||||
** CERTIFICATE 1 **
|
||||
Alias: trusted-cert-some-alias
|
||||
Serial: 15734933907626610346
|
||||
Not Before: 2014-03-14 14:10:45 +0000 UTC
|
||||
Not After : 2015-03-14 14:10:45 +0000 UTC
|
||||
Signature algorithm: SHA1-RSA
|
||||
Subject Info:
|
||||
CommonName: Test User
|
||||
Organization: [Test Organization]
|
||||
Country: [US]
|
||||
Issuer Info:
|
||||
CommonName: Test User
|
||||
Organization: [Test Organization]
|
||||
Country: [US]
|
||||
|
||||
To dump a cert chain from a TLS server:
|
||||
<img src="https://cdn.rawgit.com/square/certigo/alok/readme/output_2.svg" width="100%" height="100%">
|
||||
|
||||
openssl s_client -connect squareup.com:443 -showcerts < /dev/null | certigo dump
|
||||
|
||||
Unlike `openssl x509 -text`, certigo will dump the entire chain, not just the first certificate.
|
||||
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:
|
||||
|
||||
<img src="https://cdn.rawgit.com/square/certigo/alok/readme/output_3.svg" width="100%" height="100%">
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="100%" height="42em">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="#f7f7f7" stroke-width="2" />
|
||||
<text font-family="monospace" y="10">
|
||||
<tspan x="10" dy="1.2em">$ cat certs/cert.pem | ./certigo dump</tspan>
|
||||
<tspan x="10" dy="1.2em">** CERTIFICATE 1 **</tspan>
|
||||
<tspan x="10" dy="1.2em">Serial: 11578389349061131131</tspan>
|
||||
<tspan x="10" dy="1.2em">Not Before: <tspan fill="green">2016-05-27 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Not After : <tspan fill="green">2017-10-09 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Signature : <tspan fill="red">SHA1-RSA</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Issuer Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Warnings:</tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Certificate is not in X509v3 format (version is 2)</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Using SHA1-RSA, which is an outdated signature algorithm</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em"> </tspan>
|
||||
<tspan x="10" dy="1.2em">** CERTIFICATE 2 **</tspan>
|
||||
<tspan x="10" dy="1.2em">Serial: 11578389349061131131</tspan>
|
||||
<tspan x="10" dy="1.2em">Not Before: <tspan fill="green">2016-05-27 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Not After : <tspan fill="green">2017-10-09 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Signature : <tspan fill="red">SHA1-RSA</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Issuer Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Warnings:</tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Certificate is not in X509v3 format (version is 2)</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Using SHA1-RSA, which is an outdated signature algorithm</tspan></tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.6 KiB |
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="100%" height="45em">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="#f7f7f7" stroke-width="2" />
|
||||
<text font-family="monospace" y="10">
|
||||
<tspan x="10" dy="1.2em">$ ./certigo dump certs/cert.jks</tspan>
|
||||
<tspan x="10" dy="1.2em">Enter password:</tspan>
|
||||
<tspan x="10" dy="1.2em">** CERTIFICATE 1 **</tspan>
|
||||
<tspan x="10" dy="1.2em">Alias: second-key</tspan>
|
||||
<tspan x="10" dy="1.2em">Serial: 11578389349061131131</tspan>
|
||||
<tspan x="10" dy="1.2em">Not Before: <tspan fill="green">2016-05-27 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Not After : <tspan fill="green">2017-10-09 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Signature : <tspan fill="red">SHA1-RSA</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Issuer Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Warnings:</tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Certificate is not in X509v3 format (version is 2)</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Using SHA1-RSA, which is an outdated signature algorithm</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em"> </tspan>
|
||||
<tspan x="10" dy="1.2em">** CERTIFICATE 2 **</tspan>
|
||||
<tspan x="10" dy="1.2em">Alias: mykey</tspan>
|
||||
<tspan x="10" dy="1.2em">Serial: 11578389349061131131</tspan>
|
||||
<tspan x="10" dy="1.2em">Not Before: <tspan fill="green">2016-05-27 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Not After : <tspan fill="green">2017-10-09 21:15:31 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Signature : <tspan fill="red">SHA1-RSA</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Issuer Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: ApertureScience</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Aperture Science]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [Research and Development]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Warnings:</tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Certificate is not in X509v3 format (version is 2)</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">        <tspan fill="red">Using SHA1-RSA, which is an outdated signature algorithm</tspan></tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="100%" height="87em">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="#f7f7f7" stroke-width="2" />
|
||||
<text font-family="monospace" y="10">
|
||||
<tspan x="10" dy="1.2em">$ openssl s_client -connect squareup.com:443 -showcerts < /dev/null | ./certigo dump</tspan>
|
||||
<tspan x="10" dy="1.2em">depth=2 /C=US/O=Entrust, Inc./OU=See www.entrust.net/legal-terms/OU=(c) 2009 Entrust, Inc. - for authorized use only/CN=Entrust Root Certification Authority - G2</tspan>
|
||||
<tspan x="10" dy="1.2em">verify error:num=20:unable to get local issuer certificate</tspan>
|
||||
<tspan x="10" dy="1.2em">verify return:0</tspan>
|
||||
<tspan x="10" dy="1.2em">DONE</tspan>
|
||||
<tspan x="10" dy="1.2em">** CERTIFICATE 1 **</tspan>
|
||||
<tspan x="10" dy="1.2em">Serial: 1413474646</tspan>
|
||||
<tspan x="10" dy="1.2em">Not Before: <tspan fill="green">2014-12-22 20:28:37 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Not After : <tspan fill="green">2016-08-01 00:41:40 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Signature : <tspan fill="green">SHA256-RSA</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Info: </tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: www.squareup.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Square, Inc.]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Locality: [San Francisco]</tspan>
|
||||
<tspan x="10" dy="1.2em">Issuer Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: Entrust Certification Authority - L1M</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Entrust, Inc.]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [See www.entrust.net/legal-terms (c) 2014 Entrust, Inc. - for authorized use only]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Key ID : 6B:06:E5:5C:8A:AA:92:42:28:1F:0F:FF:15:61:A6:28:2B:0A:DE:85</tspan>
|
||||
<tspan x="10" dy="1.2em">Authority Key ID : C3:F7:D0:B5:2A:30:AD:AF:0D:91:21:70:39:54:DD:BC:89:70:C7:3A</tspan>
|
||||
<tspan x="10" dy="1.2em">Basic Constraints: CA:false</tspan>
|
||||
<tspan x="10" dy="1.2em">Key Usage: </tspan>
|
||||
<tspan x="10" dy="1.2em">        Key Encipherment</tspan>
|
||||
<tspan x="10" dy="1.2em">        Digital Signature</tspan>
|
||||
<tspan x="10" dy="1.2em">Extended Key Usage: </tspan>
|
||||
<tspan x="10" dy="1.2em">        Server Auth</tspan>
|
||||
<tspan x="10" dy="1.2em">        Client Auth</tspan>
|
||||
<tspan x="10" dy="1.2em">Alternate DNS Names:</tspan>
|
||||
<tspan x="10" dy="1.2em">        www.squareup.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        squareup.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        account.squareup.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        mkt.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        www.mkt.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        market.squareup.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        gosq.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        www.gosq.com</tspan>
|
||||
<tspan x="10" dy="1.2em">        gosq.co</tspan>
|
||||
<tspan x="10" dy="1.2em">        www.gosq.co</tspan>
|
||||
<tspan x="10" dy="1.2em"> </tspan>
|
||||
<tspan x="10" dy="1.2em">** CERTIFICATE 2 **</tspan>
|
||||
<tspan x="10" dy="1.2em">Serial: 30215777750102225331854468774</tspan>
|
||||
<tspan x="10" dy="1.2em">Not Before: <tspan fill="green">2014-12-15 15:25:03 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Not After : <tspan fill="green">2030-10-15 15:55:03 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Signature : <tspan fill="green">SHA256-RSA</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: Entrust Certification Authority - L1M</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Entrust, Inc.]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [See www.entrust.net/legal-terms (c) 2014 Entrust, Inc. - for authorized use only] </tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">Issuer Info: </tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: Entrust Root Certification Authority - G2</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Entrust, Inc.]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [See www.entrust.net/legal-terms (c) 2009 Entrust, Inc. - for authorized use only] </tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Key ID : C3:F7:D0:B5:2A:30:AD:AF:0D:91:21:70:39:54:DD:BC:89:70:C7:3A</tspan>
|
||||
<tspan x="10" dy="1.2em">Authority Key ID : 6A:72:26:7A:D0:1E:EF:7D:E7:3B:69:51:D4:6C:8D:9F:90:12:66:AB</tspan>
|
||||
<tspan x="10" dy="1.2em">Basic Constraints: CA:true, pathlen:0</tspan>
|
||||
<tspan x="10" dy="1.2em">Key Usage:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CRL Sign</tspan>
|
||||
<tspan x="10" dy="1.2em">        Cert Sign</tspan>
|
||||
<tspan x="10" dy="1.2em">Extended Key Usage: </tspan>
|
||||
<tspan x="10" dy="1.2em">        Client Auth</tspan>
|
||||
<tspan x="10" dy="1.2em">        Server Auth</tspan>
|
||||
<tspan x="10" dy="1.2em"> </tspan>
|
||||
<tspan x="10" dy="1.2em">** CERTIFICATE 3 **</tspan>
|
||||
<tspan x="10" dy="1.2em">Serial: 1372799044</tspan>
|
||||
<tspan x="10" dy="1.2em">Not Before: <tspan fill="green">2014-09-22 17:14:57 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Not After : <tspan fill="green">2024-09-23 01:31:53 +0000 UTC</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Signature : <tspan fill="green">SHA256-RSA</tspan></tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: Entrust Root Certification Authority - G2</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Entrust, Inc.]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [See www.entrust.net/legal-terms (c) 2009 Entrust, Inc. - for authorized use only]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">Issuer Info:</tspan>
|
||||
<tspan x="10" dy="1.2em">        CommonName: Entrust Root Certification Authority</tspan>
|
||||
<tspan x="10" dy="1.2em">        Organization: [Entrust, Inc.]</tspan>
|
||||
<tspan x="10" dy="1.2em">        OrganizationalUnit: [www.entrust.net/CPS is incorporated by reference (c) 2006 Entrust, Inc.]</tspan>
|
||||
<tspan x="10" dy="1.2em">        Country: [US]</tspan>
|
||||
<tspan x="10" dy="1.2em">Subject Key ID : 6A:72:26:7A:D0:1E:EF:7D:E7:3B:69:51:D4:6C:8D:9F:90:12:66:AB</tspan>
|
||||
<tspan x="10" dy="1.2em">Authority Key ID : 68:90:E4:67:A4:A6:53:80:C7:86:66:A4:F1:F7:4B:43:FB:84:BD:6D</tspan>
|
||||
<tspan x="10" dy="1.2em">Basic Constraints: CA:true, pathlen:1</tspan>
|
||||
<tspan x="10" dy="1.2em">Key Usage:</tspan>
|
||||
<tspan x="10" dy="1.2em">        Cert Sign</tspan>
|
||||
<tspan x="10" dy="1.2em">        CRL Sign</tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.9 KiB |
Reference in New Issue
Block a user