Skip to content

new-req over HTTP/2 causes "Error 400 - urn:acme:error:malformed" #1279

Closed
@jeffallen

Description

@jeffallen

I was trying to use lego to register. I was using Go from tip, and I got:

./lego -m "[email protected]" -s "https://acme-staging.api.letsencrypt.org/directory" -d nella.org -d blog.nella.org run
2015/12/15 20:14:01 No key found for account [email protected]. Generating a 2048 bit key.
2015/12/15 20:14:01 Saved key to /Users/jra/src/github.com/xenolf/lego/.lego/accounts/acme-staging.api.letsencrypt.org/[email protected]/keys/[email protected]
2015/12/15 20:14:02 [INFO] acme: Registering account for [email protected]
2015/12/15 20:14:02 Could not complete registration
acme: Error 400 - urn:acme:error:malformed - Unable to read/verify body :: Parse error reading JWS

After a lot of bisecting, I found that what's changed in Go tip to cause this is the introduction of HTTP/2 by default. When I turn off Go's HTTP/2 client support, it works:

GODEBUG=h2client=0 ./lego -m "[email protected]" -s "https://acme-staging.api.letsencrypt.org/directory" -d nella.org -d blog.nella.org run
2015/12/15 20:37:41 No key found for account [email protected]. Generating a 2048 bit key.
2015/12/15 20:37:41 Saved key to /Users/jra/src/github.com/xenolf/lego/.lego/accounts/acme-staging.api.letsencrypt.org/[email protected]/keys/[email protected]
2015/12/15 20:37:43 [INFO] acme: Registering account for [email protected]
2015/12/15 20:37:44 !!!! HEADS UP !!!!
2015/12/15 20:37:44
Your account credentials have been saved in your Let's Encrypt
configuration directory at "/Users/jra/src/github.com/xenolf/lego/.lego/accounts/acme-staging.api.letsencrypt.org/[email protected]".
You should make a secure backup of this folder now. This
configuration directory will also contain certificates and
private keys obtained from Let's Encrypt so making regular
backups of this folder is ideal.
2015/12/15 20:37:44 Please review the TOS at https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf
2015/12/15 20:37:44 Do you accept the TOS? Y/n

Note the addition of the GODEBUG environment variable.

What is your HTTP/2 implementation? Can we get some extra debugging near urn:acme:error:malformed to find out what bytes are making there?

(This happens on the live servers too, not only staging.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions