Skip to content

Conversation

@vegetable-boy
Copy link

背景

在某些安全要求较高的场景下,应用私钥需要由第三方托管(如 KMS、HSM 等),无法直接获取私钥内容。现有的 New 函数要求传入私钥字符串,无法满足这类需求。

变更内容

1. 新增函数

  • NewWithCustomSigner: 创建使用自定义签名器的支付宝客户端

2. 新增选项函数

  • WithVerifier: 用于设置自定义验签器

适用场景

  • 私钥存储在远程 KMS(密钥管理服务)中
  • 私钥由第三方托管,无法直接获取
  • 需要自定义签名算法或流程

兼容性

  • ✅ 完全向后兼容
  • ✅ 原有 New 函数保持不变
  • ✅ 新增功能为可选项

@vegetable-boy
Copy link
Author

@smartwalle 哈喽

我为项目添加了自定义签名器的支持,主要是为了解决私钥托管在 KMS 的场景。

主要变更:

  • 新增 NewWithCustomSigner 函数
  • 新增 WithVerifier 选项函数

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