1PrettyPrintCert(1)        PKI Certificate Print Tool        PrettyPrintCert(1)
2
3
4

NAME

6       PrettyPrintCert   - print the contents of a certificate stored as ASCII
7       base-64 encoded data to a readable format.
8
9

SYNOPSIS

11       PrettyPrintCert [-simpleinfo] <input_file> [output_file]
12
13

DESCRIPTION

15       The PrettyPrintCert command provides a  command-line  utility  used  to
16       print  the  contents  of  a certificate stored as ASCII base-64 encoded
17       data to a readable format.  The output of this command is displayed  to
18       standard output, but can be optionally saved into a specified file.  An
19       additional non-mandatory option is available which limits the  certifi‐
20       cate information output of this command for easier parsing.
21
22

OPTIONS

24       [-simpleinfo]
25              Optional.  Prints  limited certificate information in an easy to
26              parse format; if this option is not specified, the  entire  con‐
27              tents of the certificate will be printed.
28
29
30       <input_file>
31              Mandatory.  Specifies  the path to the file containing the ASCII
32              base-64 encoded certificate.
33
34
35       [output_file]
36              Optional. Specifies the path to  the  file  in  which  the  tool
37              should  write  the certificate. If this option is not specified,
38              the certificate information is written to the standard output.
39
40

EXAMPLES

42       The following example converts the ASCII base-64 encoded certificate in
43       the ascii_data.cert file and writes the certificate in the pretty-print
44       form to the output file cert.out:
45
46              PrettyPrintCert ascii_data.cert cert.out
47
48       For this example, the base-64 encoded certificate data in the ascii_data.cert looks like the following:
49
50              -----BEGIN CERTIFICATE-----
51              MIIECjCCAvKgAwIBAgIBCTANBgkqhkiG9w0BAQsFADBOMSswKQYDVQQKDCJ1c2Vy
52              c3lzLnJlZGhhdC5jb20gU2VjdXJpdHkgRG9tYWluMR8wHQYDVQQDDBZDQSBTaWdu
53              aW5nIENlcnRpZmljYXRlMB4XDTE2MDcyMjIwMzEzOFoXDTE3MDExODIxMzEzOFow
54              gZwxCzAJBgNVBAYTAlVTMRwwGgYDVQQKDBNFeGFtcGxlIENvcnBvcmF0aW9uMQsw
55              CQYDVQQLDAJJUzEpMCcGA1UEAwwgUHJldHR5UHJpbnRDZXJ0IFRlc3QgQ2VydGlm
56              aWNhdGUxIDAeBgkqhkiG9w0BCQEWEWFkbWluQGV4YW1wbGUuY29tMRUwEwYKCZIm
57              iZPyLGQBAQwFYWRtaW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDn
58              Jv8ADWpC7C3Bzb13n9zQwaDW8YfyshZd7lXI0cghJOSfRLT6C10LOi1yhI+7W3NN
59              MgYeLDCiRmKfHnqq6lpPg9aZmrxBwrn+30OdP+m1K6Crf6X9wqAWSR/r2hG4NuYi
60              ovcJg7ani5h4BL+V0hbUvfEs4o7QfOWjQZcoo2KbOKmRrodAA21XVjWGB1ELQLNN
61              hGwmZ6l1rtnN04Ruoclu8LaKMAAzFSH8cHEBtdCgxeDNy+bNnXbjO1wdruFNrars
62              W6wdc230AvHRcEUWEvQVq86vHfS4UZ5q0N1ychibrHZXB0/+TUtyKDQGx0K7ELSB
63              xgwt9QxEjKlXHiStcGupAgMBAAGjgaMwgaAwHwYDVR0jBBgwFoAUuzaYXWXLiOCH
64              IzdvW/evi4rrurUwTgYIKwYBBQUHAQEEQjBAMD4GCCsGAQUFBzABhjJodHRwOi8v
65              cGtpLWRlc2t0b3AudXNlcnN5cy5yZWRoYXQuY29tOjgwODAvY2Evb2NzcDAOBgNV
66              HQ8BAf8EBAMCBeAwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMA0GCSqG
67              SIb3DQEBCwUAA4IBAQCgQ/vTCyQ+lHKNDNCtvbul2l6V3Sjzvj0il9t4HtorxoBF
68              3FIE6VNpUYFq0AkNS/LjV7ek7LRl8kuuiKaNpqF6RvAIPrABPDh7hE1Gi3Vm+Xw/
69              ndodT1AVII3x6xUbRsHu2iUVdZM5xO9ZFwA18nJUznL9q8lEGjj8vVCyFZuplUL+
70              pdKqL3SgBNUdyfiV6vywevI9jFoZBlsQbn4EjBs2nNeaFSZhZ1NG6tktSt85fJ51
71              IAiZv9Ipq0deHxFgpEywPq9lSrMZnm178PFlzRQUySHSm1pA+ngTydUKqZqAU0vr
72              XIDTmj4lE93VPZspnPS94p/0OT4Pe3NKAe+IbIv/
73              -----END CERTIFICATE-----
74
75       The certificate in pretty-print format in the cert.out file looks like the following:
76
77                  Certificate:
78                      Data:
79                          Version:  v3
80                          Serial Number: 0x9
81                          Signature Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11
82                          Issuer: CN=CA Signing Certificate,O=example.com Security Domain
83                          Validity:
84                              Not Before: Friday, July 22, 2016 2:31:38 PM MDT America/Denver
85                              Not  After: Wednesday, January 18, 2017 2:31:38 PM MST America/Denver
86                          Subject: UID=admin,E=admin@example.com,CN=PrettyPrintCert Test Certificate,OU=IS,O=Example Corporation,C=US
87                          Subject Public Key Info:
88                              Algorithm: RSA - 1.2.840.113549.1.1.1
89                              Public Key:
90                                  Exponent: 65537
91                                  Public Key Modulus: (2048 bits) :
92                                      E7:26:FF:00:0D:6A:42:EC:2D:C1:CD:BD:77:9F:DC:D0:
93                                      C1:A0:D6:F1:87:F2:B2:16:5D:EE:55:C8:D1:C8:21:24:
94                                      E4:9F:44:B4:FA:0B:5D:0B:3A:2D:72:84:8F:BB:5B:73:
95                                      4D:32:06:1E:2C:30:A2:46:62:9F:1E:7A:AA:EA:5A:4F:
96                                      83:D6:99:9A:BC:41:C2:B9:FE:DF:43:9D:3F:E9:B5:2B:
97                                      A0:AB:7F:A5:FD:C2:A0:16:49:1F:EB:DA:11:B8:36:E6:
98                                      22:A2:F7:09:83:B6:A7:8B:98:78:04:BF:95:D2:16:D4:
99                                      BD:F1:2C:E2:8E:D0:7C:E5:A3:41:97:28:A3:62:9B:38:
100                                      A9:91:AE:87:40:03:6D:57:56:35:86:07:51:0B:40:B3:
101                                      4D:84:6C:26:67:A9:75:AE:D9:CD:D3:84:6E:A1:C9:6E:
102                                      F0:B6:8A:30:00:33:15:21:FC:70:71:01:B5:D0:A0:C5:
103                                      E0:CD:CB:E6:CD:9D:76:E3:3B:5C:1D:AE:E1:4D:AD:AA:
104                                      EC:5B:AC:1D:73:6D:F4:02:F1:D1:70:45:16:12:F4:15:
105                                      AB:CE:AF:1D:F4:B8:51:9E:6A:D0:DD:72:72:18:9B:AC:
106                                      76:57:07:4F:FE:4D:4B:72:28:34:06:C7:42:BB:10:B4:
107                                      81:C6:0C:2D:F5:0C:44:8C:A9:57:1E:24:AD:70:6B:A9
108                          Extensions:
109                              Identifier: Authority Key Identifier - 2.5.29.35
110                                  Critical: no
111                                  Key Identifier:
112                                      BB:36:98:5D:65:CB:88:E0:87:23:37:6F:5B:F7:AF:8B:
113                                      8A:EB:BA:B5
114                              Identifier: 1.3.6.1.5.5.7.1.1
115                                  Critical: no
116                                  Value:
117                                      30:40:30:3E:06:08:2B:06:01:05:05:07:30:01:86:32:
118                                      68:74:74:70:3A:2F:2F:70:6B:69:2D:64:65:73:6B:74:
119                                      6F:70:2E:75:73:65:72:73:79:73:2E:72:65:64:68:61:
120                                      74:2E:63:6F:6D:3A:38:30:38:30:2F:63:61:2F:6F:63:
121                                      73:70
122                              Identifier: Key Usage: - 2.5.29.15
123                                  Critical: yes
124                                  Key Usage:
125                                      Digital Signature
126                                      Non Repudiation
127                                      Key Encipherment
128                              Identifier: Extended Key Usage: - 2.5.29.37
129                                  Critical: no
130                                  Extended Key Usage:
131                                      1.3.6.1.5.5.7.3.2
132                                      1.3.6.1.5.5.7.3.4
133                      Signature:
134                          Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11
135                          Signature:
136                              A0:43:FB:D3:0B:24:3E:94:72:8D:0C:D0:AD:BD:BB:A5:
137                              DA:5E:95:DD:28:F3:BE:3D:22:97:DB:78:1E:DA:2B:C6:
138                              80:45:DC:52:04:E9:53:69:51:81:6A:D0:09:0D:4B:F2:
139                              E3:57:B7:A4:EC:B4:65:F2:4B:AE:88:A6:8D:A6:A1:7A:
140                              46:F0:08:3E:B0:01:3C:38:7B:84:4D:46:8B:75:66:F9:
141                              7C:3F:9D:DA:1D:4F:50:15:20:8D:F1:EB:15:1B:46:C1:
142                              EE:DA:25:15:75:93:39:C4:EF:59:17:00:35:F2:72:54:
143                              CE:72:FD:AB:C9:44:1A:38:FC:BD:50:B2:15:9B:A9:95:
144                              42:FE:A5:D2:AA:2F:74:A0:04:D5:1D:C9:F8:95:EA:FC:
145                              B0:7A:F2:3D:8C:5A:19:06:5B:10:6E:7E:04:8C:1B:36:
146                              9C:D7:9A:15:26:61:67:53:46:EA:D9:2D:4A:DF:39:7C:
147                              9E:75:20:08:99:BF:D2:29:AB:47:5E:1F:11:60:A4:4C:
148                              B0:3E:AF:65:4A:B3:19:9E:6D:7B:F0:F1:65:CD:14:14:
149                              C9:21:D2:9B:5A:40:FA:78:13:C9:D5:0A:A9:9A:80:53:
150                              4B:EB:5C:80:D3:9A:3E:25:13:DD:D5:3D:9B:29:9C:F4:
151                              BD:E2:9F:F4:39:3E:0F:7B:73:4A:01:EF:88:6C:8B:FF
152                      FingerPrint
153                          MD2:
154                              EC:AE:A5:A3:E5:FA:30:3B:34:0E:FD:9D:ED:46:56:03
155                          MD5:
156                              CB:E1:80:0C:B3:66:DF:CF:3A:2B:A9:C1:F4:88:88:23
157                          SHA-1:
158                              B6:BA:84:0D:AE:4E:B0:CD:84:71:D8:A4:61:60:A7:2D:
159                              3A:7C:55:46
160                          SHA-256:
161                              B2:95:9C:8C:B9:3C:7B:9F:FF:8E:BD:92:90:BC:75:F5:
162                              BB:0D:96:2C:93:05:20:1B:4C:9D:B9:59:6F:54:25:5B
163                          SHA-512:
164                              B9:7A:1E:2E:59:8C:6F:76:F5:52:36:AD:A6:62:E9:DD:
165                              00:6E:82:7A:BA:38:1E:29:FC:F8:80:F1:DD:7C:81:92:
166                              F1:C2:E3:34:27:1A:7A:EB:95:36:DB:65:41:A2:46:19:
167                              FB:14:89:00:B5:8B:DB:AA:33:41:8C:6C:C4:75:CF:17
168
169       The following example command takes the same ASCII base-64 encoded certificate in the ascii_data.cert file and writes the information contained within the certificate to the simple format output file cert.simple:
170
171              PrettyPrintCert -simpleinfo ascii_data.cert cert.simple
172
173       The simple certificate information in the cert.simple output file looks like the following:
174
175              UID=admin
176              E=admin@example.com
177              CN=PrettyPrintCert Test Certificate
178              OU=IS
179              O=Example Corporation
180              C=US
181

AUTHORS

183       Matthew Harmsen <mharmsen@redhat.com>.
184
185
187       Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General
188       Public  License, version 2 (GPLv2). A copy of this license is available
189       at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
190
191

SEE ALSO

193       PrettyPrintCrl(1),pki(1)
194
195
196
197version 10.3                     July 20, 2016              PrettyPrintCert(1)
Impressum