I tried to create an account and received a message:
“Parse error reading JWS”
I sent:
{“protected”:“eyJhbGciOiJFUzI1NiIsImp3ayI6eyJrdHkiOiJFQyIsImNydiI6IlAtMjU2IiwieCI6Ik1GWXdFQVlIS29aSXpqMENBUVlGSzRFRUFBb0RRZ0FFYmY2SUVOeWJLbXRBRGxWSVBXbEdrWi83OFVpNjg4Z3oiLCJ5Ijoia3d2Q3N4YXNGNzdrcG9xMldxWWhwWmIxa2pTWWdUVjJ5aGVld3JyZklVRlJMdHBrYVIrM2J3PT0ifSwibm9uY2UiOiIwMDAyd2hhR09SeGVDR19LeHJZemVra1U4NlJTYUhYaE9GbldUdGl0WFZUV21OdyIsInVybCI6Imh0dHBzOi8vYWNtZS1zdGFnaW5nLXYwMi5hcGkubGV0c2VuY3J5cHQub3JnL2FjbWUvbmV3LWFjY3QifQ”,“payload”:“eyJjb250YWN0IjpbIm1haWx0bzpleGFtcGxlQG1haWwuYWJjIl19”,“signature”:“IjMwNDYwMjIxMDBlOTFlMjI5YzdmYzVhNDczOWU3YWY3ZjU0ZTZmNWJkYjI1NGU3ZjVhYzc4YWYwNDc5NDU5ODE0NjQxYTlmYWRkMDIyMTAwZTBkZThhNjQ4NjVlMDZjYjgyNWE0Zjg4ZTE3NjEwOTM5NDJjNGJjYTY2NDRlOTgyNTRmNzkzMjI2YmQwZjVjNiI”}
Private key only for test:
-----BEGIN PRIVATE KEY-----
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQg0++Jn7JPTZlL0Pk71qrK
NSrwYI7/70o/T83oTY3h9TChRANCAARt/ogQ3Jsqa0AOVUg9aUaRn/vxSLrzyDOT
C8KzFqwXvuSmirZapiGllvWSNJiBNXbKF57Cut8hQVEu2mRpH7dv
-----END PRIVATE KEY-----
Is this a custom developed ACME client? Did you send the payload exactly as you shared it in this thread? I ask because I notice it has smart quotes in the JSON data (e.g. “protected” vs "protected").
Yes. This is a custom client
Try this:
{“protected”:“eyJhbGciOiJFUzI1NiIsImp3ayI6eyJrdHkiOiJFQyIsImNydiI6IlAtMjU2IiwieCI6Ik1GWXdFQVlIS29aSXpqMENBUVlGSzRFRUFBb0RRZ0FFYmY2SUVOeWJLbXRBRGxWSVBXbEdrWi83OFVpNjg4Z3oiLCJ5Ijoia3d2Q3N4YXNGNzdrcG9xMldxWWhwWmIxa2pTWWdUVjJ5aGVld3JyZklVRlJMdHBrYVIrM2J3PT0ifSwibm9uY2UiOiIwMDAyd2hhR09SeGVDR19LeHJZemVra1U4NlJTYUhYaE9GbldUdGl0WFZUV21OdyIsInVybCI6Imh0dHBzOi8vYWNtZS1zdGFnaW5nLXYwMi5hcGkubGV0c2VuY3J5cHQub3JnL2FjbWUvbmV3LWFjY3QifQ”,“payload”:“eyJjb250YWN0IjpbIm1haWx0bzpleGFtcGxlQG1haWwuYWJjIl19”,“signature”:“IjMwNDYwMjIxMDBlOTFlMjI5YzdmYzVhNDczOWU3YWY3ZjU0ZTZmNWJkYjI1NGU3ZjVhYzc4YWYwNDc5NDU5ODE0NjQxYTlmYWRkMDIyMTAwZTBkZThhNjQ4NjVlMDZjYjgyNWE0Zjg4ZTE3NjEwOTM5NDJjNGJjYTY2NDRlOTgyNTRmNzkzMjI2YmQwZjVjNiI”}
Agreed, e.g. your jwk.x is encoded as MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEbf6IENybKmtADlVIPWlGkZ/78Ui688gz, but should be MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEbf6IENybKmtADlVIPWlGkZ_78Ui688gz.
I accepted your advice given above, but the error comes again:
{“type”:“urn:ietf:params:acme:error:malformed”,“detail”:“Parse error reading JWS”,“status”:400}
failed to unmarshal JWK: square/go-jose: invalid EC key, X/Y are not on declared curve: "{"kty":"EC","crv":"P-256","x":"Hnz42zCU036-zaGWup_Wxgdc1SV7mEllp0uEffVyTIM","y":"KMJj-Vsvy4uOD7oQMKdK2ElADEjJKgY4PVvvgSLaSYE"}"