mORMot2 Daily每日上游提交速读

加密工厂迁移到独立单元

本期包含一项源码级兼容性变更。高层加密工厂目录以及密钥/证书相关 helper 从 mormot.crypt.secure 迁移到新的 mormot.crypt.factory 单元,具体实现不变。直接通过 mormot.crypt.secure 引入这些声明的 Delphi/FPC 应用需要更新 uses 子句。

要点

  • 若应用代码目前通过 mormot.crypt.secure 使用 Rnd、Hash、Sign、Cipher、Asym、Cert、Store 或已迁移的密钥/证书 API,请加入 mormot.crypt.factory。
  • 声明与实现均原样迁移;提交明确说明运行时行为不变。
  • Lazarus mormot2 包、总入口单元、框架调用方和测试现已包含 mormot.crypt.factory。
  • 原始 payload 不含 superseded_by 数据,因此不声称存在后续替代提交或稳定窗口。

升级建议

升级到合并后的头部 5fc8e0ad461275ff23f52e327a81ec78234e4873 前,请在应用 uses 子句中查找 mormot.crypt.secure,并在引用已迁移工厂、密钥或证书声明的位置加入 mormot.crypt.factory。重新构建所有 Delphi/FPC 目标;diff 未显示需要运行时迁移或数据转换。

提交2
行数+10526 -10328
阅读1 分钟

1 条中的 1 条 · 上游 2 次提交

# 条目 类别 单元
1 高 高层加密 API 移出 mormot.crypt.secure 新增的 mormot.crypt.factory 单元接收 Rnd/Hash/Sign/Cipher/Asym/Cert/Store 目录、相关公共接口和类,以及 PrivateKeyToPkcs8、X509PubKeyToDer、TX509Parsed、X509Parse 等密钥/证书 helper。mormot.crypt.secure 保留身份验证和较底层的 PEM/DER/ASN.1 编解码器。provider、网络、Lazarus 包及测试的 uses 子句已导入新单元,六处限定工厂调用也改为 mormot.crypt.factory。 破坏性变更 mormot.crypt.factory+11 c0dd071d+5263-5164

crypt: new mormot.crypt.factory unit extracted from mormot.crypt.secure

影响

现有 Delphi/FPC 代码若只导入 mormot.crypt.secure 并使用任一已迁移声明,将无法编译,直到在 uses 子句中加入 mormot.crypt.factory。使用 mormot2 总入口单元的代码已获得新单元。提交说明这是原样移动,因此完成源码迁移后,不涉及加密、序列化或运行时行为变化。

需要迁移

在应用 uses 子句中查找 mormot.crypt.secure,并检查 Rnd、Hash、Hasher、Sign、Signer、Cipher、CipherAlgo、Asym、Cert、Store、TX509Parsed、X509Parse、PrivateKeyToPkcs8 与 X509PubKeyToDer 的引用。为每个受影响单元加入 mormot.crypt.factory,然后重新构建所有编译器与平台目标。

公开 API

  • Rndremoved — 该声明从 mormot.crypt.secure 原样迁移到 mormot.crypt.factory。
  • Hashremoved — 该声明从 mormot.crypt.secure 原样迁移到 mormot.crypt.factory。
  • Signremoved — 该声明从 mormot.crypt.secure 原样迁移到 mormot.crypt.factory。
  • Cipherremoved — 该声明从 mormot.crypt.secure 原样迁移到 mormot.crypt.factory。
  • Asymremoved — 该声明从 mormot.crypt.secure 原样迁移到 mormot.crypt.factory。
  • Certremoved — 该声明从 mormot.crypt.secure 原样迁移到 mormot.crypt.factory。
  • Storeremoved — 该声明从 mormot.crypt.secure 原样迁移到 mormot.crypt.factory。
  • TX509Parsedremoved — 此公共证书解析类型现属于 mormot.crypt.factory。
  • X509Parseremoved — 此公共解析 hook 现属于 mormot.crypt.factory。

zen010101 · 15:35 UTC · 在 GitHub 上查看该提交 →

上游活动 每日提交数 · 最近 60 天
提交1007
活跃天数49/60
最忙一天2026-09-30
峰值60
2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 12 commits2026-10-11: 2 commits2026-10-12: 40 commits2026-10-13: 31 commits2026-10-14: 23 commits2026-10-15: 16 commits2026-10-16: 27 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 3 commits2026-10-23: 6 commits2026-10-24: 29 commits2026-10-25: 7 commits2026-10-26: 25 commits2026-10-27: 4 commits2026-10-28: 8 commits2026-10-29: 17 commits2026-10-30: 20 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 16 commits2026-11-03: 32 commits2026-11-04: 15 commits2026-11-05: 32 commits2026-11-06: 26 commits2026-11-07: 19 commits2026-11-08: 2 commits2026-11-09: 29 commits2026-11-10: 17 commits2026-11-11: 8 commits2026-11-12: 38 commits2026-11-13: 39 commits2026-11-14: 9 commits2026-11-15: 6 commits2026-11-16: 21 commits2026-11-17: 30 commits2026-11-18: 37 commits2026-11-19: 28 commits2026-11-20: 31 commits2026-11-21: 0 commits2026-11-22: 0 commits2026-11-23: 1 commit2026-11-24: 6 commits2026-11-25: 3 commits2026-11-26: 3 commits2026-11-27: 0 commits2026-11-28: 0 commits
2026-09-302026-11-28