Skip to content

Fix challenge deserialization for token-less challenge types - #93

Merged
FlorianUekermann merged 1 commit into
FlorianUekermann:mainfrom
bunert:optional-token
May 15, 2026
Merged

Fix challenge deserialization for token-less challenge types#93
FlorianUekermann merged 1 commit into
FlorianUekermann:mainfrom
bunert:optional-token

Conversation

@bunert

@bunert bunert commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

RFC 8555 only requires a token field for specific challenge types (http-01, dns-01, tls-alpn-01). Newer challenge types such as dns-persist-01 omit it. Add #[serde(default)] to the challenge token so deserialization does not fail when the field is absent.

…s-persist-01)

RFC 8555 only requires a token field for specific challenge types (http-01, dns-01, tls-alpn-01). Newer challenge types such as dns-persist-01 omit it. Add #[serde(default)] to Challenge::token so deserialization does not fail when the field is absent.
@bunert

bunert commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

Fixes #92

The high_level_tokio example is already broken:

cargo run --example high_level_tokio --features tokio -- \                                  ↵ 1
          -d your.domain.com \
          -p 443 \
          -c /tmp/acme-cache
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
     Running `sudo -E target/debug/examples/high_level_tokio -d your.domain.com -p 443 -c /tmp/acme-cache`
2026-04-22T14:59:30.196Z INFO  [rustls_acme::incoming] event: AccountCacheStore
2026-04-22T14:59:33.442Z ERROR [rustls_acme::incoming] event: Order(Acme(Json(Error("missing field `token`", line: 28, column: 5))))
2026-04-22T14:59:37.801Z ERROR [rustls_acme::incoming] event: Order(Acme(Json(Error("missing field `token`", line: 22, column: 5))))
2026-04-22T14:59:43.724Z ERROR [rustls_acme::incoming] event: Order(Acme(Json(Error("missing field `token`", line: 28, column: 5))))
2026-04-22T14:59:51.607Z ERROR [rustls_acme::incoming] event: Order(Acme(Json(Error("missing field `token`", line: 22, column: 5))))

@FlorianUekermann
FlorianUekermann merged commit 67b5e9d into FlorianUekermann:main May 15, 2026
37 checks passed
@FlorianUekermann

Copy link
Copy Markdown
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants