@@ -30,7 +30,7 @@ mv tlschecker-macos tlschecker
30
30
sudo install tlschecker /usr/local/bin/tlschecker
31
31
```
32
32
33
- ##
33
+ ## How to use
34
34
35
35
``` sh
36
36
➜ tlschecker --help
@@ -46,11 +46,12 @@ Options:
46
46
-o < OUTPUT>
47
47
Enable verbose to see what is going on
48
48
49
- [default: text ]
49
+ [default: summary ]
50
50
51
51
Possible values:
52
- - json: Enable JSON in the output
53
- - text: Enable Text in the output
52
+ - json: Enable JSON in the output
53
+ - text: Enable Text in the output
54
+ - summary: Summary by default
54
55
55
56
--exit-code < EXIT_CODE>
56
57
Exits with code 0 even when certificate expired is detected
@@ -61,96 +62,19 @@ Options:
61
62
Print help (see a summary with ' -h' )
62
63
63
64
-V, --version
64
- Print version
65
65
```
66
66
67
- ## How to use
67
+ ## Examples
68
68
69
69
``` sh
70
70
➜ tlschecker jpbd.dev expired.badssl.com
71
- ➜ ~ tlschecker jpbd.dev expired.badssl.com
72
- --------------------------------------
73
- Hostname: jpbd.dev
74
- Issued domain: sni.cloudflaressl.com
75
- Subject Name :
76
- Country or Region: US
77
- State or Province: California
78
- Locality: San Francisco
79
- Organizational Unit: None
80
- Organization: Cloudflare, Inc.
81
- Common Name: sni.cloudflaressl.com
82
- Issuer Name:
83
- Country or Region: US
84
- Organization: Cloudflare, Inc.
85
- Common Name: Cloudflare Inc ECC CA-3
86
- Valid from: Jul 2 00:00:00 2022 GMT
87
- Valid to: Jul 2 23:59:59 2023 GMT
88
- Days left: 123
89
- Expired: false
90
- Certificate version: 2
91
- Certificate algorithm: ecdsa-with-SHA256
92
- Certificate S/N: 20332696690017175202539153893006852358
93
- Subject Alternative Names:
94
- DNS Name: sni.cloudflaressl.com
95
- DNS Name: jpbd.dev
96
- DNS Name: * .jpbd.dev
97
- Additional Certificates (if supplied):
98
- Chain # 1
99
- Subject: " sni.cloudflaressl.com"
100
- Valid from: " Jul 2 00:00:00 2022 GMT"
101
- Valid until: " Jul 2 23:59:59 2023 GMT"
102
- Issuer: " Cloudflare Inc ECC CA-3"
103
- Signature algorithm: " ecdsa-with-SHA256"
104
- Chain # 2
105
- Subject: " Cloudflare Inc ECC CA-3"
106
- Valid from: " Jan 27 12:48:08 2020 GMT"
107
- Valid until: " Dec 31 23:59:59 2024 GMT"
108
- Issuer: " Baltimore CyberTrust Root"
109
- Signature algorithm: " sha256WithRSAEncryption"
110
- --------------------------------------
111
- Hostname: expired.badssl.com
112
- Issued domain: * .badssl.com
113
- Subject Name :
114
- Country or Region: None
115
- State or Province: None
116
- Locality: None
117
- Organizational Unit: Domain Control Validated
118
- Organization: None
119
- Common Name: * .badssl.com
120
- Issuer Name:
121
- Country or Region: GB
122
- Organization: COMODO CA Limited
123
- Common Name: COMODO RSA Domain Validation Secure Server CA
124
- Valid from: Apr 9 00:00:00 2015 GMT
125
- Valid to: Apr 12 23:59:59 2015 GMT
126
- Days left: -2879
127
- Expired: true
128
- Certificate version: 2
129
- Certificate algorithm: sha256WithRSAEncryption
130
- Certificate S/N: 99565320202650452861752791156765321481
131
- Subject Alternative Names:
132
- DNS Name: * .badssl.com
133
- DNS Name: badssl.com
134
- Additional Certificates (if supplied):
135
- Chain # 1
136
- Subject: " *.badssl.com"
137
- Valid from: " Apr 9 00:00:00 2015 GMT"
138
- Valid until: " Apr 12 23:59:59 2015 GMT"
139
- Issuer: " COMODO RSA Domain Validation Secure Server CA"
140
- Signature algorithm: " sha256WithRSAEncryption"
141
- Chain # 2
142
- Subject: " COMODO RSA Domain Validation Secure Server CA"
143
- Valid from: " Feb 12 00:00:00 2014 GMT"
144
- Valid until: " Feb 11 23:59:59 2029 GMT"
145
- Issuer: " COMODO RSA Certification Authority"
146
- Signature algorithm: " sha384WithRSAEncryption"
147
- Chain # 3
148
- Subject: " COMODO RSA Certification Authority"
149
- Valid from: " May 30 10:48:38 2000 GMT"
150
- Valid until: " May 30 10:48:38 2020 GMT"
151
- Issuer: " AddTrust External CA Root"
152
- Signature algorithm: " sha384WithRSAEncryption"
153
- ➜ ~
71
+ ┌────────────────────┬─────────┬────────┬─────────────────────┬──────────────────────┐
72
+ │ Host ┆ Expired ┆ Status ┆ Days before expired ┆ Hours before expired │
73
+ ╞════════════════════╪═════════╪════════╪═════════════════════╪══════════════════════╡
74
+ │ jpbd.dev ┆ false ┆ OK ┆ 79 ┆ 1896 │
75
+ ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
76
+ │ expired.badssl.com ┆ true ┆ ERROR ┆ -3041 ┆ -72984 │
77
+ └────────────────────┴─────────┴────────┴─────────────────────┴──────────────────────┘
154
78
```
155
79
156
80
``` sh
@@ -159,46 +83,114 @@ Chain #3
159
83
{
160
84
" hostname" : " jpbd.dev" ,
161
85
" subject" : {
162
- " country_or_region" : " US " ,
163
- " state_or_province" : " California " ,
164
- " locality" : " San Francisco " ,
86
+ " country_or_region" : " None " ,
87
+ " state_or_province" : " None " ,
88
+ " locality" : " None " ,
165
89
" organization_unit" : " None" ,
166
- " organization" : " Cloudflare, Inc. " ,
167
- " common_name" : " sni.cloudflaressl.com "
90
+ " organization" : " None " ,
91
+ " common_name" : " jpbd.dev "
168
92
},
169
93
" issued" : {
170
94
" country_or_region" : " US" ,
171
- " organization" : " Cloudflare, Inc. " ,
172
- " common_name" : " Cloudflare Inc ECC CA-3 "
95
+ " organization" : " Let's Encrypt " ,
96
+ " common_name" : " E1 "
173
97
},
174
- " valid_from" : " Jul 2 00:00:00 2022 GMT" ,
175
- " valid_to" : " Jul 2 23:59:59 2023 GMT" ,
176
- " validity_days" : 123,
98
+ " valid_from" : " Jul 31 07:41:38 2023 GMT" ,
99
+ " valid_to" : " Oct 29 07:41:37 2023 GMT" ,
100
+ " validity_days" : 79,
101
+ " validity_hours" : 1896,
177
102
" is_expired" : false,
178
- " cert_sn" : " 20332696690017175202539153893006852358 " ,
103
+ " cert_sn" : " 417275593632489451472716682020094135372872 " ,
179
104
" cert_ver" : " 2" ,
180
- " cert_alg" : " ecdsa-with-SHA256 " ,
105
+ " cert_alg" : " ecdsa-with-SHA384 " ,
181
106
" sans" : [
182
- " sni.cloudflaressl.com" ,
183
- " jpbd.dev" ,
184
- " *.jpbd.dev"
107
+ " *.jpbd.dev" ,
108
+ " jpbd.dev"
185
109
],
186
110
" chain" : [
187
111
{
188
- " subject" : " sni.cloudflaressl.com" ,
189
- " issuer" : " Cloudflare Inc ECC CA-3" ,
190
- " valid_from" : " Jul 2 00:00:00 2022 GMT" ,
191
- " valid_to" : " Jul 2 23:59:59 2023 GMT" ,
192
- " signature_algorithm" : " ecdsa-with-SHA256"
112
+ " subject" : " jpbd.dev" ,
113
+ " issuer" : " E1" ,
114
+ " valid_from" : " Jul 31 07:41:38 2023 GMT" ,
115
+ " valid_to" : " Oct 29 07:41:37 2023 GMT" ,
116
+ " signature_algorithm" : " ecdsa-with-SHA384"
117
+ },
118
+ {
119
+ " subject" : " E1" ,
120
+ " issuer" : " ISRG Root X2" ,
121
+ " valid_from" : " Sep 4 00:00:00 2020 GMT" ,
122
+ " valid_to" : " Sep 15 16:00:00 2025 GMT" ,
123
+ " signature_algorithm" : " ecdsa-with-SHA384"
124
+ },
125
+ {
126
+ " subject" : " ISRG Root X2" ,
127
+ " issuer" : " ISRG Root X1" ,
128
+ " valid_from" : " Sep 4 00:00:00 2020 GMT" ,
129
+ " valid_to" : " Sep 15 16:00:00 2025 GMT" ,
130
+ " signature_algorithm" : " sha256WithRSAEncryption"
193
131
},
194
132
{
195
- " subject" : " Cloudflare Inc ECC CA-3 " ,
196
- " issuer" : " Baltimore CyberTrust Root" ,
197
- " valid_from" : " Jan 27 12:48:08 2020 GMT" ,
198
- " valid_to" : " Dec 31 23:59:59 2024 GMT" ,
133
+ " subject" : " ISRG Root X1 " ,
134
+ " issuer" : " DST Root CA X3 " ,
135
+ " valid_from" : " Jan 20 19:14:03 2021 GMT" ,
136
+ " valid_to" : " Sep 30 18:14:03 2024 GMT" ,
199
137
" signature_algorithm" : " sha256WithRSAEncryption"
200
138
}
201
139
]
202
140
}
203
141
]
204
142
```
143
+
144
+ ``` sh
145
+ ➜ tlschecker jpbd.dev -o text
146
+ --------------------------------------
147
+ Hostname: jpbd.dev
148
+ Issued domain: jpbd.dev
149
+ Subject Name :
150
+ Country or Region: None
151
+ State or Province: None
152
+ Locality: None
153
+ Organizational Unit: None
154
+ Organization: None
155
+ Common Name: jpbd.dev
156
+ Issuer Name:
157
+ Country or Region: US
158
+ Organization: Let' s Encrypt
159
+ Common Name: E1
160
+ Valid from: Jul 31 07:41:38 2023 GMT
161
+ Valid to: Oct 29 07:41:37 2023 GMT
162
+ Days left: 79
163
+ Hours left: 1896
164
+ Expired: false
165
+ Certificate version: 2
166
+ Certificate algorithm: ecdsa-with-SHA384
167
+ Certificate S/N: 417275593632489451472716682020094135372872
168
+ Subject Alternative Names:
169
+ DNS Name: *.jpbd.dev
170
+ DNS Name: jpbd.dev
171
+ Additional Certificates (if supplied):
172
+ Chain #1
173
+ Subject: "jpbd.dev"
174
+ Valid from: "Jul 31 07:41:38 2023 GMT"
175
+ Valid until: "Oct 29 07:41:37 2023 GMT"
176
+ Issuer: "E1"
177
+ Signature algorithm: "ecdsa-with-SHA384"
178
+ Chain #2
179
+ Subject: "E1"
180
+ Valid from: "Sep 4 00:00:00 2020 GMT"
181
+ Valid until: "Sep 15 16:00:00 2025 GMT"
182
+ Issuer: "ISRG Root X2"
183
+ Signature algorithm: "ecdsa-with-SHA384"
184
+ Chain #3
185
+ Subject: "ISRG Root X2"
186
+ Valid from: "Sep 4 00:00:00 2020 GMT"
187
+ Valid until: "Sep 15 16:00:00 2025 GMT"
188
+ Issuer: "ISRG Root X1"
189
+ Signature algorithm: "sha256WithRSAEncryption"
190
+ Chain #4
191
+ Subject: "ISRG Root X1"
192
+ Valid from: "Jan 20 19:14:03 2021 GMT"
193
+ Valid until: "Sep 30 18:14:03 2024 GMT"
194
+ Issuer: "DST Root CA X3"
195
+ Signature algorithm: "sha256WithRSAEncryption"
196
+ ```
0 commit comments