Skip to content

fix(acme): 修复 internal 载荷属性在 AOT 下被丢弃导致 finalize CSR 为空 - #32

Merged
239573049 merged 1 commit into
mainfrom
fix/acme-challenge-empty-payload-aot
Jul 22, 2026
Merged

fix(acme): 修复 internal 载荷属性在 AOT 下被丢弃导致 finalize CSR 为空#32
239573049 merged 1 commit into
mainfrom
fix/acme-challenge-empty-payload-aot

Conversation

@239573049

Copy link
Copy Markdown
Owner

Order.Payload.Csr 与 Account.Payload.OnlyReturnExisting 声明为 internal, System.Text.Json 源生成器只序列化 public 成员,二者被静默丢弃:

  • finalize 请求缺少 csr 字段,Let's Encrypt 报 'asn1: syntax error: sequence truncated'
  • onlyReturnExisting 丢失会破坏"仅返回已有账号"流程

改为 public 并加 [JsonInclude]。外层 Payload 类本身是 internal, 不会扩大公共 API 表面。

本地验证:真实 CSR 经签名后 csr 字段完整往返(DER 278B,tag 0x30),
onlyReturnExisting 正常序列化。

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Order.Payload.Csr 与 Account.Payload.OnlyReturnExisting 声明为 internal,
System.Text.Json 源生成器只序列化 public 成员,二者被静默丢弃:
- finalize 请求缺少 csr 字段,Let's Encrypt 报
  'asn1: syntax error: sequence truncated'
- onlyReturnExisting 丢失会破坏"仅返回已有账号"流程

改为 public 并加 [JsonInclude]。外层 Payload 类本身是 internal,
不会扩大公共 API 表面。

本地验证:真实 CSR 经签名后 csr 字段完整往返(DER 278B,tag 0x30),
onlyReturnExisting 正常序列化。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@239573049
239573049 merged commit 4c96ca2 into main Jul 22, 2026
1 check failed
@239573049
239573049 deleted the fix/acme-challenge-empty-payload-aot branch July 22, 2026 10:50
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.

1 participant