PEM signing embeds an X.509 certificate chain directly in the signature value, letting verifiers pin a root CA
rather than a bare public key. Use it when your organization has existing PKI infrastructure.
For the conceptual background on key pinning vs. certificate chain trust, see
Trust Models.
flowchart LR
subgraph sign ["Sign (You)"]
direction TB
A[Component Version] --> C[Sign with Leaf Key]
C --> D[Signature + Embedded Chain]
end
D --> T["Share Component"]
T --> verify
subgraph verify ["Verify (Consumer)"]
direction TB
E[Signature + Embedded Chain] --> H[Verify Chain against Root CA]
H --> I{Valid?}
I -->|Yes| VALID["✓ Trusted"]
I -->|No| INVALID["✗ Rejected"]
end
style VALID fill:#dcfce7,color:#166534
style INVALID fill:#fee2e2,color:#991b1b
At signing time OCM embeds the leaf certificate (and any intermediates) into the signature value.
The root CA is never embedded – the verifier holds it as a trust anchor.
Component:github.com/acme.org/helloworld:1.0.0 in a local CTF archive at /tmp/helloworld/transport-archive
(created by the
Create Component Versions tutorial)
Working directory:~/.ocm/keys/pem-demo
Signer files:leaf.key, chain.pem
Verifier file:root.crt
Root CA must not be embedded
Never include the root CA in the certificate chain you supply to the signer.
OCM rejects any self-signed certificate found in the embedded chain to prevent
signers from asserting their own trust anchor.
The following steps cover the required setup for two scenarios,
one with a simple Root CA directly signing the leaf certificate, and another with an intermediate CA between the Root and Leaf.
Generate a certificate chain and prepare the chain file#
If your organization already has a PKI, obtain a leaf certificate (and intermediate chain if applicable)
from your CA. Place the leaf certificate (and any intermediates, root excluded) into chain.pem and skip to the next step.
Otherwise, generate a chain locally with openssl. Choose the option that fits your setup and follow all commands within that tab – each tab is self-contained.
The root CA signs the leaf directly. No intermediate is needed.
Create separate credential entries for the signer and verifier roles.
The file paths must be absolute – ~ and $HOME are not expanded in YAML values.
Use the shell commands below to generate the files with the correct paths automatically:
When a self-signed certificate is supplied as public_key_pem_file for verification,
OCM uses it as an isolated trust anchor and bypasses the system root store entirely.
Only signatures rooted in that specific CA will verify successfully.
For the full credential property and consumer identity reference, see
PEM signing is an early access feature. The OCM CLI prints an experimental notice during signing and verification – this is expected and does not indicate a failure. We are awaiting feedback and the interface may evolve.
Expected signature value in the component descriptor
-----BEGIN SIGNATURE-----
Signature Algorithm: RSASSA-PSS
<base64-encoded signature bytes>
-----END SIGNATURE-----
-----BEGIN CERTIFICATE-----
<leaf certificate DER>
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
<intermediate CA DER> ← only present if intermediates were included in chain.pem
-----END CERTIFICATE-----
No --verifier-spec is needed – OCM infers the PEM encoding from the application/x-pem-file
media type stored alongside the signature and selects the correct handler automatically.
✅ Success! ✅ The component version is verified as authentic and unmodified.
If verification fails, see the troubleshooting section below.
Generate certificate chain and prepare the chain file#
If your organization already has a PKI, obtain a leaf certificate (and intermediate chain if applicable)
from your CA. Place the leaf certificate (and any intermediates, root excluded) into chain.pem and skip to the next step.
Otherwise, generate a chain locally with openssl. Choose the option that fits your setup and follow all commands within that tab – each tab is self-contained.
Add an intermediate CA to keep the root CA key offline or to delegate signing authority.
Create separate credential entries for the signer and verifier roles.
The file paths must be absolute – ~ and $HOME are not expanded in YAML values.
Use the shell commands below to generate the files with the correct paths automatically:
When a self-signed certificate is supplied as public_key_pem_file for verification,
OCM uses it as an isolated trust anchor and bypasses the system root store entirely.
Only signatures rooted in that specific CA will verify successfully.
For the full credential property and consumer identity reference, see
PEM signing is an early access feature. The OCM CLI prints an experimental notice during signing and verification – this is expected and does not indicate a failure. We are awaiting feedback and the interface may evolve.
Expected signature value in the component descriptor
-----BEGIN SIGNATURE-----
Signature Algorithm: RSASSA-PSS
<base64-encoded signature bytes>
-----END SIGNATURE-----
-----BEGIN CERTIFICATE-----
<leaf certificate DER>
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
<intermediate CA DER> ← only present if intermediates were included in chain.pem
-----END CERTIFICATE-----
No --verifier-spec is needed – OCM infers the PEM encoding from the application/x-pem-file
media type stored alongside the signature and selects the correct handler automatically.
The root CA in the verification config doesn’t match the root that signed the embedded chain.
Check that public_key_pem_file points to the correct root CA.