2 min read

解决acme.sh报错:ClientAuth证书被弃用问题

问题现象

在使用acme.sh申请证书时,可能会遇到以下错误信息:

[Mon Dec 22 09:01:52 PM CST 2025] Signing failed. Finalize code was not 200.
[Mon Dec 22 09:01:52 PM CST 2025] {"type":"urn:ietf:params:acme:error:badCSR","detail":"ClientAuth certificates are being deprecated by Q2 2026, please see https://pki.goog/updates/may2025-clientauth.html for the phased rollout schedule. Requests for clientAuth certificates must set the `?client_auth=true` query parameter in the ACME directory URL.","requestID":"oJkPHXk_OZ_MJTXREWNZzA"}
[Mon Dec 22 09:01:52 PM CST 2025] Please add '--debug' or '--log' to see more information.
[Mon Dec 22 09:01:52 PM CST 2025] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

错误原因分析

根据错误信息,Google PKI正在逐步弃用ClientAuth证书,计划在2026年第二季度完成弃用。从2025年5月开始,Google将按照分阶段的时间表进行更新。

错误提示表明,如果需要申请ClientAuth证书,必须在ACME directory URL中添加?client_auth=true查询参数。

解决方案

幸运的是,acme.sh官方已经在新版本中修复了这个问题。最简单的解决方案是:

升级acme.sh到最新版本

执行以下命令将acme.sh升级到最新版本:

acme.sh --upgrade

升级完成后,新版本的acme.sh会自动处理ClientAuth证书的申请流程,无需手动修改配置。

预防措施

  • 建议定期升级acme.sh到最新版本,以确保获得最新的功能和修复
  • 关注Google PKI的官方更新,了解证书政策的变更
  • 如需调试,可以添加--debug--log参数查看详细信息

参考资料

Google PKI更新公告:https://pki.goog/updates/may2025-clientauth.html
acme.sh调试文档:https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

总结

这个错误主要是由于Google PKI政策变更导致的,acme.sh开发者已经在新版本中适配了这一变更。通过简单的升级操作即可解决问题,无需复杂的手动配置。建议用户保持工具的定期更新,以避免类似的兼容性问题。