ffMathy / FluffySpoon.AspNet.EncryptWeMust

MIT License
146 stars 29 forks source link

Fix condition for finishing challenge validation #219

Closed PreferLinux closed 3 years ago

PreferLinux commented 3 years ago

Fixes #216

Challenge validation either succeeds when all authorizations (which have one challenge each) are valid, or fails when any are invalid.

I have tested this against a local Pebble instance. When testing without this change, I consistently hit #216, and with the change it works (but only kind of, due to other unrelated issues).

Local testing was fun though. It required modifications to set a custom ACME server, and to bypass validating the server's TLS cert (it's local, so the cert is self-signed). Pebble seems to transition the order to Processing instead of immediately going to Valid (which is quite allowable) which Certes doesn't handle, so update it to the recent beta, and then instead Certes can't find the root / intermediate certificates (for obvious reasons). But Pebble issues the certificate, so everything is working.

ffMathy commented 3 years ago

Thank you so much for this! Can we add some tests perhaps? ❤️👌

PreferLinux commented 3 years ago

I had to change the Test project target framework to net5.0, as one (at least) of the dependencies is not available for .Net Core 3.1.

I hope this looks good. Not sure how else to test this.