Show HN: 我用 Go 重写了 2012 年的自签名证书生成器 – cert-depot.com

3作者: dimastopel4 个月前
早在 2012 年,我利用周末时间构建了 <a href="https:&#x2F;&#x2F;cert-depot.com" rel="nofollow">https:&#x2F;&#x2F;cert-depot.com</a>。它基于 Node.js + Express + jQuery,通过调用 OpenSSL 来生成证书。虽然它能运行,但我最终放弃了维护。 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4766743">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4766743</a> 现在我用 Go 从头重写了它。整个项目是一个没有外部依赖的单一二进制文件: 1. 证书生成使用 Go 的 crypto/x509 库(不再依赖 OpenSSL) 2. 证书在内存中生成并直接流式传输——服务器上不存储任何内容 3. 支持 RSA 2048/4096 和 ECDSA P-256/P-384 4. 支持主题备用名称(自 Chrome 58 以来,浏览器要求必须有此项) 5. 输出格式:ZIP (PEM 文件) 或 PFX/PKCS#12 欢迎提出您的评论、建议和错误报告。感谢! 源代码:<a href="https:&#x2F;&#x2F;github.com&#x2F;dimastopel&#x2F;certdepot" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dimastopel&#x2F;certdepot</a>
查看原文
Back in 2012 I built <a href="https:&#x2F;&#x2F;cert-depot.com" rel="nofollow">https:&#x2F;&#x2F;cert-depot.com</a> as a weekend project. Node.js + Express + jQuery, shelling out to OpenSSL for certificate generation. It worked but I eventually let it rot. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4766743">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4766743</a><p>Rewrote it from scratch in Go. The entire thing is a single binary with no external dependencies:<p>1. Certificate generation uses Go&#x27;s crypto&#x2F;x509 (no OpenSSL)<p>2. Certificates are generated in memory and streamed directly — nothing is stored on the server<p>3. RSA 2048&#x2F;4096 and ECDSA P-256&#x2F;P-384<p>4. Subject Alternative Names (required by browsers since Chrome 58)<p>5. ZIP (PEM files) or PFX&#x2F;PKCS#12 output<p>You comments &#x2F; suggestions &#x2F; bug reports are very welcome. Thanks.<p>Source: <a href="https:&#x2F;&#x2F;github.com&#x2F;dimastopel&#x2F;certdepot" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dimastopel&#x2F;certdepot</a>