unixcharles / acme-client

A Ruby client for the letsencrypt's ACME protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Faraday leaves ports away in JWS headers

neckhair opened this issue · comments

We are hitting a strange problem with the Let's Encrypt API at the moment.

We're always getting these errors for several of the urls. It's really weird, because the API clearly returns the URL's without the port. Anyway we will have to add the port to the url when signing the request in the Faraday middleware.

Error: JWS header parameter 'url' incorrect. Expected "https://acme-v02.api.letsencrypt.org:443/acme/new-order" got "https://acme-v02.api.letsencrypt.org/acme/new-order"

We are trying to find a way around that and will come back with a PR if we find something.

URI::Generic#to_s leaves the port away if it's 443. That shouldn't happen.

https://github.com/unixcharles/acme-client/blob/master/lib/acme/client/faraday_middleware.rb#L44

This is caused by a change at Let's Encrypt. They are now resolving it. So nothing to be done here. letsencrypt/boulder#4447