diff --git a/src/Certes/Acme/Resource/Account.cs b/src/Certes/Acme/Resource/Account.cs
index bba2ac8..4b2cc93 100644
--- a/src/Certes/Acme/Resource/Account.cs
+++ b/src/Certes/Acme/Resource/Account.cs
@@ -71,8 +71,13 @@ internal class Payload : Account
///
/// The only return existing flag.
///
+ // Must be public for the source generator to emit it — see the note on
+ // Order.Payload.Csr. An internal setter would be silently dropped, breaking
+ // the "return existing account" lookup. Payload is internal, so the public
+ // accessor does not widen the API surface.
[JsonPropertyName("onlyReturnExisting")]
- internal bool? OnlyReturnExisting { get; set; }
+ [JsonInclude]
+ public bool? OnlyReturnExisting { get; set; }
}
}
}
diff --git a/src/Certes/Acme/Resource/Order.cs b/src/Certes/Acme/Resource/Order.cs
index 680a618..5b31b06 100644
--- a/src/Certes/Acme/Resource/Order.cs
+++ b/src/Certes/Acme/Resource/Order.cs
@@ -107,8 +107,14 @@ internal class Payload : Order
///
/// The CSR.
///
+ // Must be public: System.Text.Json's source generator serializes only public
+ // members, so an internal Csr is silently dropped and finalize sends a payload
+ // with no csr — the server then fails with "asn1: syntax error: sequence
+ // truncated". The enclosing Payload class is internal, so this does not widen
+ // the public API surface.
[JsonPropertyName("csr")]
- internal string Csr { get; set; }
+ [JsonInclude]
+ public string Csr { get; set; }
}
}
}