400 Status - urn:acme:error:malformed - JWS verification error


#1

Hey all,

I’m running into trouble getting ACME to accept my new-reg request for a self-coded client. I’m coding in Python using pycrypto for signing functions.

The response received from ACME is:

{
  "type": "urn:acme:error:malformed",
  "detail": "JWS verification error",
  "status": 400
}

My request, sent to https://acme-staging.api.letsencrypt.org/acme/new-reg, is:

{
    "header": {
        "alg": "RS256",
        "jwk": {
            "e": "AQAB",
            "kty": "RSA",
            "n": "y4hEYwMNnugxdUrXOXPoO01grq-Hq8Z1sGnP-3s9QRuXwuJIRa3ywwhleHzGhmKwqfn46zD3NkFyA1dGUFQW2LIpSp8A1h8O3Fwj4qG9q5XeezRmvCFX9H4xIgE4RDIncki7weyr3H0FFUXCXEha38if0lCyZ-7KIc173NKMuEd_M4wfUL1lei8Z-j8dxPDsfQn_wg8DjR2CC-0HC8tBBlXWYYHf4Kx5vc9LLgtwPu4889vTZanAW7oiveZE4g4Yw3Vsl4YleNwnGaU3aFMa6Ma7Wh50Pk0ofNGQHuUwjgC5ZFO5YtGFPVmbXf6M_TrP9-eK8fg2StzWfcxgUiPM8S1MI8O5Q496606tTWFUgeVDI_HGy1DZnOxe877ES-z_K7J-E26ZskLjGDMwyNrT-f5aSsoIWHEdF3v-Ezr0Rk-q4KY2AmgpruhoVegB2IAYdx6n04kDpLem2l8ygseB7PYkH5_Yp8Jl3wBit1yPvQExERtG0feB2wvSLhWWjCx_Wx6jkcvLWRbwUj8j2XO4qWWJGq7wfwHUe2XvVH0XsDsDFMAnZxVh0D3vQTaMWQu4J3wOovgDkMO5MaL1pYyfWTu7M4nZ5T07m3Ww4Pvhhnpm_BvmGmuV1ugKds-pyQj8aKEsmleFi2EVxjzWvRaoizp_f95cDFOdlTXq2SA0Y7M"
        }
    },
    "payload": "eyJyZXNvdXJjZSI6ICJuZXctcmVnIiwgImFncmVlbWVudCI6ICJodHRwczovL2xldHNlbmNyeXB0Lm9yZy9kb2N1bWVudHMvTEUtU0EtdjEuMC4xLUp1bHktMjctMjAxNS5w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dcVgIykpa
/vnT2sgwMxjjQrKZbhN+siv/7EvEvvNe7JzZUMvG8SND5YFUYU2tTut6j0O5wyNM
LfHMI1JgzH3W3Eo2+PGK5/fPOv2M/l2bWT2F0WK5U2S5AI4w5R6Q0XwoTT50Hlq7
xugaU2g3pRkn3HglhpdsdcMYDuJE5r0iulvAqWXT2/M87j5wCy5Lz715rODfgWHW
VQZBywsH7QuCHY0DD8L/CX3s8MQdP/oZL3plvVAfjDN/R7iM0tx7zSHK7meyUNKf
yN9aSFzCRRUFfdyr7MG7SHInMkQ4ASIxfvRXIbxmNHvelau9oeIjXNwOH9YAn0op
stgWVFBGVwNyQTb3MOv4+amwYobGfHhlCMPyrUVI4sKXG0E9e/vPabB1xquHr65g
TTvocznXSnUx6J4NA2NEiMsCAwEAAQ==
-----END PUBLIC KEY-----

I’ve tried playing with just about everything and have run out of ideas. Any help would be greatly appreciated!

Thanks.


#2

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