签名之前,请操纵CSR文件的内容

发布于 2025-02-10 22:35:01 字数 536 浏览 1 评论 0原文

长话短说:

  • 我们经营自己的CA,我们那里有很多政策,其中一些政策要求CSR拥有SAN领域的
  • “客户”通常无法生成适当的CSR,该企业会议包含此类扩展,因此工具等。
  • 我们使用的产品实际上可以在签名步骤之前添加/更改SAN字段(在GUI中,不幸的是不可脚本脚本.....)

问题 - 我如何修改CSR,以便我添加SAN字段(没有私钥,我只有CSR文件) - 从命令行,任何命令行,bash,powershell,erthing或任何语言,python,java等?

它必须可行,因为它可以通过GUI(商业产品,因此很难....)可行。 据我了解,企业社会责任本身由“属性”和公共密钥部分组成,因此我需要“分离”它们,以我想要的方式操纵“属性”,然后将它们放回原处,然后将它们放回原处,然后将它们重新放回实际上可以签名的有效CSR 。

我尝试了什么 - 围绕OpenSSL玩游戏,但是在最新版本中,它打破了最终的CSR,以使 - 验证返回垃圾,即使可以,我也不想签署。

欢迎任何想法!

谢谢 !

BKH

Long story short :

  • we run our own CA, we have a bunch of policies there, in some of them we DEMAND that the CSR has a SAN field
  • "customers" often are unable to generate a proper CSR that contains such extension, due to old tools, etc.
  • the product that we use can actually add/change the SAN field(s) just before the signing step (in the GUI, unfortunately not scriptable.....)

Question - how can i modify the CSR so that i add the SAN field (without having the private key, i ONLY have the CSR file) - from the command line, any command line, bash, powershell, whatever, or any language, python, java, etc. ?

It has to be doable, since it is doable through a GUI (commercial product so its difficult....).
From what i understand the CSR itself consists of "attributes" and public key part so i need to "detach" them, manipulate the "attributes" the way i want to and then put them back together to a valid CSR that can actually be signed.

What have i tried - play around openssl, but in the latest version it breaks the final CSR so that the -verify returns garbage and i dont want to sign that even if i could.

Any ideas are welcome !

Thanks !

BKH

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文