Parse error reading JWS

Hello,

I tried to create an account and therefore need to send a request signed with ES256 (SECP256k1). However, I keep running into the same error :

{
   "type": "urn:ietf:params:acme:error:malformed",
   "detail": "Parse error reading JWS",
   "status": 400
}

Here is an request example generated by this code :

{'protected': 'eyJhbGciOiAiRVMyNTYiLCAiandrIjogeyJjcnYiOiAiUC0yNTYiLCAia3R5IjogIkVDIiwgIngiOiAiQy1idFQzbHBmYXdlc0lsRXQ0VTFGREtnSGVMX1U3NW8yUU1RQjE0cDdmYyIsICJ5IjogInVGTXZpSklRUVp5VEhtcFZQS1pSNU9XOFNnMHNmOExhTDhVenoxNXd6Qk0ifSwgIm5vbmNlIjogIk5ERmVmOTJxcEhVZFFNVlpCZVF6NUEiLCAidXJsIjogImh0dHBzOi8vbG9jYWxob3N0OjE0MDAwL3NpZ24tbWUtdXAifQ', 'payload': 'eyJ0ZXJtc09mU2VydmljZUFncmVlZCI6IHRydWV9', 'signature': 'wMXK6d_8QQXugMO6tEGD6A29EibOovW48rl0cIuA_LjdJnjqK7NimB-Jnau3n_nbUpYhStHszlUo-c38yby0Xg'}

thank you !

4 Likes

Hello,

one thing I noticed is that you are using the curve secp256k1, which is not supported, try using prime256v1 (P-256) or secp384r1 (P-384) instead.

8 Likes

Hello,
I saw your comment on another post and I tried at the time but it didn't work.
I just tried again a few minuts ago and it finally works !
Thanks a lot !

6 Likes