Skip to content

Clarify certificate encoding format: base64(DER) vs base64(PEM) #132

@matlec

Description

@matlec

Bug description

The Device Client Onboarding section states:

certificate - Base64-encoded X.509 certificate of the client

This is ambiguous. "Base64-encoded X.509 certificate" could mean:

  1. base64(DER) - Raw DER bytes, base64-encoded (e.g., MIIDdz...)
  2. base64(PEM) - PEM file base64-encoded again (e.g.,LS0tLS1CRUdJTi...)

The example in the spec shows "certificate": "MIIDdzCCAl+gAwIBAgIEb1..." which is base64(DER). The sandbox implementation uses base64(PEM).

Proposed fix

Recommendation: Standardize on base64(DER)

base64(DER) is smaller, JSON-friendly, and matches what other specs such as JWS use to encode certificates. base64(PEM) would double-encode the certificate with base64.

Suggested spec wording:

certificate - Base64-encoded DER X.509 certificate (raw binary, no PEM headers).

Anything else (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions