Skip to content

[Bug]: step certificate inspect on a p12 or pfx file results in error "invalid PEM block" #1573

Open

Description

@YANSA23

Steps to Reproduce

step certificate p12 cert.p12 certs/root_ca.crt secrets/root_ca_key

Your Environment

OS - Debian 13.3
step-ca Version - Smallstep CA/0.29.0 (linux/amd64)

Expected Behavior

Information in the certificate file

Actual Behavior

"contains an invalid PEM block"

Additional Context

created p12/pfx with "step certificate p12 certificate.p12 certs/root_ca.crt secrets/root_ca_key"

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Activity

  1. self-assigned this
    on Mar 3, 2026
  2. hslatman commented on Mar 10, 2026

    @hslatman
    Member

    Hey @YANSA23, at the moment this is expected behavior.

    step certificate inspect is meant for file formats that are known to contain only certificate (bundles), whereas a .p12 can contain a private key, as well as other types of objects, such as encrypted blobs. We're open to suggestions and contributions to handle this use case in a user-friendly, but correct manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugneeds triageWaiting for discussion / prioritization by team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions