Chapter 8.
Pretty Print Certificate
The Pretty Print Certificate utility, PrettyPrintCert, prints the contents of a certificate stored as
ASCII base-64 encoded data to a readable format.
8.1. Syntax
The PrettyPrintCert command has the following syntax:
PrettyPrintCert [-simpleinfo] input_file [output_file]
Option
simpleinfo
input_file
output_file
8.2. Usage
The following example converts the ASCII base-64 encoded certificate in the ascii_cert.in file
and writes the certificate in the pretty-print form to the output file ascii_cert.out.
PrettyPrintCert /usr/home/smith/test/ascii_cert.in /usr/home/smith/test/ascii_cert.out
The base-64 encoded certificate data in the ascii_cert.in looks like the following:
-----BEGIN CERTIFICATE-----
MIIC2DCCAkGgAwIBAgICEAwwDQYJKoZIhvcNAQEFBQAwfDELMAkGA1UEBhMCVVMxIzA
hBgNVBAoTGlBhbG9va2FWaWxsZSBXaWRnZXRzLCBJbmMuMR0wGwYDVQQLExRXaWRnZX
QgTWFrZXJzICdSJyBVczEpMCcGA1UEAxMgVGVzdCBUZXN0IFRlc3QgVGVzdCBUZXN0I
FRlc3QgQ0EwHhcNOTkwMjE4MDMMzM5WhcNMDAwMjE4MDM0MzM5WjCBrjELMAkGA1UEB
hMCVVMxJjAkBgNVBAoTHU5ldHNjYXBlIENvbW11bmljYXRpb25zIENvcnAuMRUwEwYD
VQQLEwOZXRzY2FwZSBDTVMxGDAWBEBEwhtaGFybXNlbjEfMB0GA1UEAxWaW50ZGV2Y2
EgQWRtaW5pcwp0frfJOObeiSsia3BuifRHBNw95ZZQR9NIXr1x5bE
-----END CERTIFICATE-----
The certificate in pretty-print format in the ascii_cert.out file looks like the following:
Certificate:
Data:
Version: v3
Serial Number: 0x100C
Signature Algorithm: OID.1.2.840.113549.1.1.5 -1.2.840.113549.1.1.5
Issuer: CN=Test CA,OU=Widget Makers 'R'Us,O=Example Corporation, Widgets\,Inc.,C=US
Validity:
Not Before: Wednesday, February 17, 1999 7:43:39 PM
Not After: Thursday, February 17, 2000 7:43:39 PM
Subject: MAIL=admin@example.com,CN=testCA Administrator, UID=admin, OU=IS,
O=Example Corporation,C=US
Subject Public Key Info:
Algorithm: RSA - 1.2.840.113549.1.1.1
Public Key:
Description
Optional. Prints limited certificate information in an easy to parse format.
Specifies the path to the file containing the ASCII base-64 encoded certificate.
Optional. Specifies the path and file to which the tool should write the certificate. If
information is written to the standard output.
29
Need help?
Do you have a question about the CERTIFICATE SYSTEM 8 - COMMAND-LINE and is the answer not in the manual?
Questions and answers