PKISharp / ACMESharpCore

An ACME v2 client library for .NET Standard (Let's Encrypt)
MIT License
325 stars 72 forks source link

Remove indentation from the request payload JSON #55

Open shibayan opened 3 years ago

shibayan commented 3 years ago

Believe it or not, some ACME implementations return an error if there is indentation in the JSON of the request payload. https://github.com/win-acme/win-acme/issues/1565

I noticed this problem in the ACME implementation of ZeroSSL.

ebekker commented 3 years ago

Hmm, interesting. I assume you confirmed with this change, it is now working with ZeroSSL or similar implementations?

shibayan commented 3 years ago

Yes, removing the indentation worked correctly. It's very strange.

I am working on the EAB support now and the following code confirms that it works. Although not included in the PR, ACMESharpCore directly incorporates the version with the indentation removed. https://github.com/shibayan/keyvault-acmebot/pull/252

Error message:

ProblemType":14,"ProblemTypeRaw":"urn:ietf:params:acme:error:malformed","ProblemDetail":"The JWS Protected Header MUST be present","ProblemStatus":400,