acme.messages.OrderResource: Make roundtrippable through JSON (#9617)

Right now if you to_json() an `OrderResource` and later deserialize
it, the `AuthorizationResource` objects don't come back through the
round-trip (they just get de-jsonified as frozendicts and worse, they
can't even be passed to `AuthorizationResource.from_json` because
frozendicts aren't dicts). In addition, the `csr_pem` field gets
encoded as an array of integers, which definitely does not get
de-jsonified into what we want.

Fix these by adding an encoder to `authorizations` and encoder and
decoder to `csr_pem`.
This commit is contained in:
Anna Glasgall
2023-03-21 10:49:39 -07:00
committed by GitHub
parent c07b5efb7f
commit 5d5dc429c4
4 changed files with 50 additions and 2 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Added
*
* `acme.messages.OrderResource` now supports being round-tripped
through JSON
### Changed