Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为CA证书启用自动重载 #3607

Merged
merged 5 commits into from
Jul 29, 2024
Merged

Conversation

lelemka0
Copy link
Contributor

@lelemka0 lelemka0 commented Jul 28, 2024

  1. 为用途为issue的CA证书启用自动重载,用法与encipherment一致,使用ocspStapling作为重载检查周期,且与oneTimeLoading冲突。
  2. CertificateObject下添加一个选项buildChain,类型为bool,仅对issue用途的CA证书生效,用于将CA证书嵌入证书链。解决当签名CA为中间CA时,客户端仅信任根CA的情况下,证书链不完整的问题。
  3. 避免签发的证书有效期范围超过CA证书。
  4. 修复了若私钥不变,证书改变无法重载的问题。

Add an option `certificates.buildChain` in TLSConfig to generate
 cert chains during issuing certificates.
fix not reloading when cert updated but key not
@yuhan6665
Copy link
Member

感谢 PR!问下 buildChain 加入 CA 证书有副作用吗?如果没有似乎可以当 bug 修了不用加选项?

@Fangliding
Copy link
Member

这东西还有人用吗 我之前写acme的时候觉得太杂都想删了

感谢 PR!问下 buildChain 加入 CA 证书有副作用吗?如果没有似乎可以当 bug 修了不用加选项?

参考acme.sh的 xxxx.cer 和 fullchain.cer

@lelemka0
Copy link
Contributor Author

lelemka0 commented Jul 28, 2024

问下 buildChain 加入 CA 证书有副作用吗?

fulchain只包含leaf证书和中间证书链,不包含根证书,所以这个选项只应该在CA证书是中间证书时使用。
虽然在证书链中附加根CA不会发生什么奇怪的事,但还是不要做比较好

另外修复了原证书重载中,若私钥不变,证书改变无法重载的问题,忘了写,已编辑。

@RPRX
Copy link
Member

RPRX commented Jul 29, 2024

晚点应该会合并

@RPRX RPRX merged commit 4531a7e into XTLS:main Jul 29, 2024
36 checks passed
@mmmray
Copy link
Collaborator

mmmray commented Jul 29, 2024

I believe this is missing documentation

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.

5 participants