Debian Codegraph @

cmd/certverify/README

raw
1 certverify
2
3 This is a small utility to verify a TLS X.509 certificate. It returns
4 0 on success; on error, it prints the error and returns with exit code 1.
5 It does not check for revocations (though this is a planned feature),
6 and it does not check the hostname (it deals only in certificate files).
7
8 [ Usage ]
9 certverify [-ca bundle] [-f] [-i bundle] [-r] [-v] certificate
10
11 [ Flags ]
12 -ca bundle Specify the path to the CA certificate bundle
13 to use.
14 -f Force the use of the intermediate bundle, ignoring
15 any intermediates bundled with the certificate.
16 -i bundle Specify the path to the intermediate certificate
17 bundle to use.
18 -r Print revocation and expiry information.
19 -v Print extra information during the program's run.
20 If the certificate validates, also prints 'OK'.
21
22 [ Examples ]
23
24 To verify the 'www.pem' certificate against the system roots:
25
26 $ certverify www.pem
27 $ echo $?
28 0
29
30 To verify the 'www.pem' certificate against the 'ca-cert.pem' CA
31 certificate bundle, and seeing a mismatch:
32
33 $ certverify -ca ca-cert.pem www.pem
34 Verification failed: x509: certificate signed by unknown authority
35 $ echo $?
36 1
37
38 Using the stealchain (../stealchain) util, print revocation and expiry
39 information for google.com:
40
41 $ stealchain google.com
42 [+] wrote google.com.pem.
43 $ certverify -r google.com.pem
44 certificate expires in 53d.
45