fix(acme): 修复挑战验证阶段匿名 {} 载荷在 AOT 下无 JsonTypeInfo 崩溃 - #31
Merged
Conversation
ChallengeContext.Validate 使用 new {} 作为空对象载荷,Native AOT 下
CertesJsonContext.GetTypeInfo(匿名类型) 返回 null,JwsSigner.Sign 调用
JsonSerializer.Serialize(payload, null) 抛出 ArgumentNullException,
导致证书申请在挑战验证阶段失败。
- 新增已注册的 EmptyObject 载荷类型,序列化为 {}(RFC 8555 §7.5.1)
- JwsSigner.Sign 对无法解析元数据的载荷抛出可诊断的 InvalidOperationException,
而非深层 STJ 的裸 ArgumentNullException
- 保留 null 载荷 -> 空串(POST-as-GET)语义
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ChallengeContext.Validate 使用 new {} 作为空对象载荷,Native AOT 下 CertesJsonContext.GetTypeInfo(匿名类型) 返回 null,JwsSigner.Sign 调用 JsonSerializer.Serialize(payload, null) 抛出 ArgumentNullException, 导致证书申请在挑战验证阶段失败。
Motivation and Context
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context