#1314 PrettyPrintCert tool works only when header and footer is removed from the certificate base-64
Closed: migrated 3 years ago by dmoluguw. Opened 9 years ago by mharmsen.

In CS 9.0 PrettyPrintCert tool accepts only the base-64 ASCII part of the
certificate. "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" from
the base-64 should be removed.

In CS 8.1 PrettyPrintCert worked with the complete base-64 of the cert
including header and footer OR without it, https://access.redhat.com/documentat
ion/en-US/Red_Hat_Certificate_System/8.1/html/Command-Line_Tools_Guide/Pretty_P
rint_Certificate-Usage.html

How reproducible:

Always

Steps to Reproduce:

1.# cat sample.b64
-----BEGIN CERTIFICATE-----
MIIC6jCCAdKgAwIBAgICA9kwDQYJKoZIhvcNAQENBQAwMzEPMA0GA1UECgwGcmVk
aGF0MSAwHgYDVQQDDBdQS0kgUk9PVENBIFNpZ25pbmcgQ2VydDAeFw0xNTAzMTgy
MTI5MDFaFw0xNzAzMDcyMTI5MDFaMBUxEzARBgNVBAMTCjEwLjE2LjQuMjYwgZ8w
DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMTwH+D1NotSo2/s7vBb1UaF8ngXaVlF
2mudgh6f/EGqrfMfwBXlVscNNI/SJ6xXq388CoG4zlQ31TMGWvCuq2jG/+66SLqS
Mng46pXFsqEZ1es1vGlmXkpE3NAZzUf2UVJ1zaBq5XsUNNgNMldOGkQ0+deCTGEg
H9/kUmhCgMS5AgMBAAGjgakwgaYwHwYDVR0jBBgwFoAUabPNAcmlzv8nc/MkqDt6
4nsvLuEwVAYIKwYBBQUHAQEESDBGMEQGCCsGAQUFBzABhjhodHRwOi8vcWVibGFk
ZTMucmhxLmxhYi5lbmcuYm9zLnJlZGhhdC5jb206MzAwNDQvY2Evb2NzcDAOBgNV
HQ8BAf8EBAMCBeAwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMA0GCSqG
SIb3DQEBDQUAA4IBAQBVNe9W7Y23GozkizryPRQRY0AdnlgUTS8jUgYnku9pcVRC
ju86QzZqI3nP9Az/19P6Sabm+n2ABK2xxLiqBxM9VJ3hkwvBR0mDxc8nunKWDFb4
5TzhF7qqSaK00yQ4DQOoFFzHOz67rFp5F+tpLQTHnq1YpZCDqKg3X2ZbTzRM49Kl
96MjLxwqoVtW3l0h34ClojWTDgxb/NZSB9DXUaDvW8wfzPCckywCekVkwm3vtOmP
hBC7CIgazdovWzMIddDYJG7/Ra9w4FD4XtY0a2acjlaFExuCP/y8KUCDEA+vBIe+
DHdMY2/6sk5bl1lcshUMaFTNRIIzQg5JIk8s+vJv

-----END CERTIFICATE-----

#  PrettyPrintCert sample.b64 pretty.out
Usage:  PrettyPrintCert [options] <input filename> [output filename]

 options:
    -simpleinfo     :  prints limited cert info in easy to parse format

 ERROR:  'sample.b64' is not an ASCII file!

         First, use 'BtoA sample.b64 sample.b64.b64'
         to convert a binary file into an ASCII file.

Actual results:

PrettyPrintCert fails to create pretty print of certificate in readable format.

When I remove "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----"
from sample.b64, PrettyPrintCert successfully created the output file.

Expected results:

PrettyPrintCert should work with base-64 of a certificate including header and
footer.

Per CS/DS meeting of 2015/03/23: 10.3

Per Bug Triage of 05/03/2016: 10.4

Metadata Update from @mharmsen:
- Issue set to the milestone: UNTRIAGED

7 years ago

Metadata Update from @mharmsen:
- Custom field feature adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field version adjusted to None
- Issue close_status updated to: None
- Issue set to the milestone: 10.5 (was: UNTRIAGED)

6 years ago

[20171025] - Offline Triage ==> 10.6

Metadata Update from @mharmsen:
- Issue set to the milestone: 10.6 (was: 10.5)

6 years ago

Per 10.5.x/10.6 Triage: 10.6

mharmsen: work-around exists

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1876

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata