New client: JWS verification error: malformed

Hi everyone,

I’m developing a new acme client, and so far I’m struggling with new account registration. My generated payload passes JWS validation, so I think it might be something to do with the nonce, but can’t figure out what’s wrong exactly. Here is the request I’m sending:

POST request to the "",
with the following headers set:
"user-agent": "certifika 0.1/reqwest 0.10"
"content-type": "application/jose+json"


Any advice on what’s wrong with my JWS/nonce is highly appreciated.

Hi @epicfile

not really?


Your url is wrong. Must be something like

or the staging url, if you use that.

Your signature is 71 bytes, which I think is probably the ASN.1 padded version:

$ dumpasn1 -t -l sig.der
  0  69: SEQUENCE {
  2  33:   INTEGER
      :     00 DF A7 48 F6 B6 8A 2A    ...H...*
      :     5E 68 50 0A 3F 60 3B 59    ^hP.?`;Y
      :     9E 27 58 0C F2 A0 6D 4B    .'X...mK
      :     D6 68 7F DC 7F 92 FB 0C    .h......
      :     57                         W
37  32:   INTEGER
      :     6E 7F 18 59 03 0E 3C C5    n..Y..<.
      :     6F C3 32 C4 23 CC B8 30    o.2.#..0
      :     81 60 1A 46 F6 11 82 6F    .`.F...o
      :     B1 30 F5 82 68 86 AC D2
      :   }

0 warnings, 0 errors.

For JWS ES256, a fixed 64-byte signature is expected. So you would take the two integer values (R, S) from inside the ASN.1 encoding, pad them to 32 bytes each as necessary, and mash them together into a 64 byte array.

Are you generating the signature with OpenSSL or something?

(I think you have other problems in your JWS as well, but this is the first problem to overcome).

1 Like

well, I posted a wrong example, I used that one to debug what’s going on. Here is another one with the correct url:


I don’t think url is the problem here…

Wow, thanks, I did not know about that…That’s must be it…I’m not using openssl, I’m writing the client in rust, and using this crate to sign the message:
Will have to dig a lil bit deeper into it. Thanks for the hint!

@_az Jesus Christ, you were absolutely right, I’ve tuned the signing algorithm parameters, and now it works! Thanks again!

1 Like

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