Intermediate certificates concatenation


I have written a new python client using only as cryptographic library.
Everything works fine except for the concatenation of intermediate certificates.

First, I think that the schema on Chain of Trust - Let's Encrypt is outdated because it does not mention X3 and X4 certificates.

Then, I don't understand why these certificates are not provided through the ACME protocol. Maybe the official letsencrypt server could offer them as an extension of the protocol, through another URI ?

Finally, I don't understand how I should concatenate them. Is it the following ?

[certificate issued by the ACME protocol]

Thanks in advance for any answer,

Agreed, although they are mentioned on the page correctly, the diagram needs updating.

They are. If you look at it states "The server can also provide the client with direct access to an SCT for a certificate using a Link relation header" and provides the example;

GET /acme/cert/asdf HTTP/1.1
Accept: application/pkix-cert

HTTP/1.1 200 OK
Content-Type: application/pkix-cert
Link: <>;rel="up";title="issuer"
Link: <>;rel="revoke"
Link: <>;rel="author"
Link: <>;rel="ct-sct"
Link: <>;rel="directory"

[DER-encoded certificate]

If you check the headers when you receive the certificate, you should see a link for the Issuer certificate there.

Do you know what application you want to use it for ? i.e. some applications ( such as older versions of apache ) want them in separate files, whereas other applications want them combined.

Another thing to note is that you don’t include the root as the relying party needs to already have it, so it’s a waste of bandwidth. In addition if you’re sending the intermediate cross-signed by IdenTrust then the ISRG root is completely irrelevant.

1 Like

Small correction: You don't want the SCT link here, but rather the issuer certificate, which is included as the rel="up" link:

In particular, the server MUST include a Link relation header field [RFC5988] with relation “up” to provide a certificate under which this certificate was issued

1 Like

A handful of the existing Python clients do not download the signing certificate. If you based your client on one of those, sorry. I made the same mistake.

nginx wants a fullchain like this:

# le_x3 or whatever signed it via `rel="up"` in the headers
fullchain_pem = "\n".join(cert_pem, le_x3_cert_pem)
1 Like

Thanks everybody for your answers, my problems are solved (except the diagram part).

I didn’t use let’s encrypt client cause I needed something that I can program (and I wanted to understand the protocol).
I used as an inspiration (especially for the base64 encoding and the JWS things) but I rewrite everything into nice python classes (and I check meticulously combinations of challenges). I hope to release this soon. I also need to look at that

The acme-tiny author refuses to download the intermediate certificate. Many people have constantly brought this up. (i did as well, but somehow my comment got borked)

LetsEncrypt should actually warn people against using the acme-tiny client.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.