Should the x5c chain in a HAIP request object include the root certificate?

x5c request-object chain excludes the root trust anchorHAIP 1.0 §5MUSTRoles: verifier, wallet

Requirement as recorded in the ProtocolSoup registry

The x5c request-object certificate chain excludes the root trust anchor.

Read §5 in HAIP 1.0

Self-test verdict

PassCommit 00bac3fEvaluated

This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.

Captured from production

Captured Commit 00bac3f

Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.

Passing exchange

Accepted, as requiredConformance client

The conformance client fetches the request object of a HAIP request, which the verifier signs under the x509_hash Client Identifier Prefix. Its x5c header must start with a leaf certificate that is not self-signed and whose SHA-256 hash is the client_id, and must not include the self-signed root, which the wallet holds as its own trust anchor. The request object's signature must verify with the leaf key.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.GET https://protocolsoup.com/oid4vp/request/22Y5MULLtsSULkHWn98i5HYW200 OK

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    GET /oid4vp/request/22Y5MULLtsSULkHWn98i5HYW HTTP/2.0
    Accept: application/oauth-authz-req+jwt
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    

    Response

    HTTP/2.0 200 OK
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65ba1999d873cdb-MSP
    Content-Type: application/oauth-authz-req+jwt
    Date: Sun, 06 Dec 2026 13:28:00 GMT
    Fly-Request-Id: 01M95RMF0ETPX2HFFXYS15VANR-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=4wAXnzMRU4xm9pvyX4TYSLupMmXQutVO4CzgbjBG7Kf3H3b6LB8uIlgMEILZFlWsMUq3vEr%2FHEE6ziH%2FCSDX4TVlH2BEBmW6REtLnmgcNqzy6ViJoTbAkc8ddOK6glNbjxc%3D"}]}
    Server: cloudflare
    Speculation-Rules: "/cdn-cgi/speculation"
    Vary: Origin
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    eyJhbGciOiJFUzI1NiIsInR5cCI6Im9hdXRoLWF1dGh6LXJlcStqd3QiLCJ4NWMiOlsiTUlJQnp6Q0NBWFdnQXdJQkFnSUJBakFLQmdncWhrak9QUVFEQWpBN01SVXdFd1lEVlFRS0V3eFFjbTkwYjJOdmJGTnZkWEF4SWpBZ0JnTlZCQU1UR1ZCeWIzUnZZMjlzVTI5MWNDQkZjR2hsYldWeVlXd2dRMEV3SGhjTk1qWXdPREE0TVRFeU16TTFXaGNOTWpjd09EQTRNVEV5T0RNMVdqQXlNUlV3RXdZRFZRUUtFd3hRY205MGIyTnZiRk52ZFhBeEdUQVhCZ05WQkFNVEVIQnliM1J2WTI5c2MyOTFjQzVqYjIwd1dUQVRCZ2NxaGtqT1BRSUJCZ2dxaGtqT1BRTUJCd05DQUFRMXRMRlB2QlMwM3g0ZzdTUWtYbkhZWWR4WG5GUy8vd3dqZE5yTnAwVG9GU0VGQnhTRko0K0sxbG5GS0swU3NNWWJqK1pNZXdKMkljbTcveXBScElzQm8zTXdjVEFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUhBd0V3REFZRFZSMFRBUUgvQkFJd0FEQWZCZ05WSFNNRUdEQVdnQlJxOGJMWm9TNmFzY2ZTTTdPdndjL2NQSk1WL3pBYkJnTlZIUkVFRkRBU2doQndjbTkwYjJOdmJITnZkWEF1WTI5dE1Bb0dDQ3FHU000OUJBTUNBMGdBTUVVQ0lRRDBNTzU3Tm83U042Q2ptd29MemJxL3RYRUc2RGRKYm5YQXRYYTdQdlhnM0FJZ0RPZzI0ZTM5RWRZZ3UzODErK2pzc1pZMm9Cdy9xR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C5jb20vY3JlZGVudGlhbHMvdW5pdmVyc2l0eV9kZWdyZWUiXX19XX0sImV4cCI6MTc5NjU2Mzk3OSwiaWF0IjoxNzk2NTYzNjc5LCJpc3MiOiJ4NTA5X2hhc2g6bjVqMksxSHR1d0FTMEpkQS1iRGNPQW5LRnRtZ3g1aTQzZUdpUFpkM05CayIsImp0aSI6IjIyWTVNVUxMdHNTVUxrSFduOThpNUhZVyIsIm5vbmNlIjoiMzd5SEFBV3Z1LXQ3MGVuT3E4dTVSekdQZUJFRng5NDJlRXc1MVd1bDFhVSIsInJlc3BvbnNlX21vZGUiOiJkaXJlY3RfcG9zdC5qd3QiLCJyZXNwb25zZV90eXBlIjoidnBfdG9rZW4iLCJyZXNwb25zZV91cmkiOiJodHRwczovL3Byb3RvY29sc291cC5jb20vb2lkNHZwL3Jlc3BvbnNlIiwic3RhdGUiOiJvcDVWRVBmdGxhWmZXY3BUdHQtX2lZenQifQ.ToHzSBCDgZAQbOoGI74OhV8-bpqVCpSy12vFyC04K2NSRFCQihH2XgJJaccKRuhs1eBToCbctcySNP-K7SdARA

Failing exchange

Not captured: The verifier builds the x5c header from its own certificate chain, and OpenID4VP defines no wallet or client request that could make it include the root, so there is nothing for the verifier to reject.

Run it live

Looking Glass runs the flow that sends the message this requirement governs, against the same server, and decodes each exchange as it happens.

Open the flow in Looking Glass

Tests

Implementation

Explainer

What this requires

HAIP 1.0 Section 5 sets the rules for signed OpenID4VP requests: "The X.509 certificate of the trust anchor MUST NOT be included in the x5c JOSE header of the signed request." The same paragraph requires the Verifier to use the x509_hash Client Identifier Prefix and says "The X.509 certificate signing the request MUST NOT be self-signed."

In practice the x5c array starts with the leaf certificate that signed the request object and may carry intermediates, but the root CA is left out. The wallet already holds the roots it trusts and builds the path to one of them on its own.

Why it exists

HAIP does not give a reason in the text. The concrete risk is that a root delivered inside the message proves nothing: anyone can put a self-signed CA certificate in a header. A wallet that takes the last certificate of x5c as its anchor, instead of looking up a root in its own trust store, accepts any request whose sender minted its own CA. Leaving the root out means the wallet has to do the lookup that actually establishes trust.

What non-compliance looks like

The request object header carries x5c as [leaf, root], where the final entry is a CA certificate that verifies under its own key. A strict HAIP wallet can refuse the request outright. A careless one may accept it because the chain "validates" against the root it was handed.

How ProtocolSoup tests it

The verifier signs x509_san_dns and x509_hash request objects with the same signer. When it builds the x5c header (x5cHeader in verifier_identity.go), it drops the final certificate of the configured chain if that certificate is a CA and verifies under its own key. With no provisioned chain, the verifier generates a two-certificate chain (CA plus leaf), so only the leaf is sent. The hosted wallet checks request-object chains against its own configured roots. Any certificates after the leaf are used only as intermediates, never as anchors.

TestCreateAuthorizationRequestBuildsX509SANDNSRequestObject provisions a leaf and a self-signed root through OID4VP_X509_SANDNS_CERT_CHAIN_PEM and creates an x509_san_dns request. It then decodes the request object and asserts that x5c contains exactly one certificate, that this certificate chains to the root supplied out of band, that its SAN matches verifier.example, and that the request signature verifies with the leaf key. The test uses the x509_san_dns prefix rather than x509_hash. It covers the shared signer, but not the wallet side of this row.

Related requirements

All HAIP 1.0 requirements · OID4VCI protocol page