使用 Python 向 Windows 证书颁发机构服务器提交 CSR

时间:2021-03-10 19:22:37

标签: python-3.x windows certificate ca

我有一个 Python 脚本,它使用 OpenSSL 在我们的 Linux 服务器上创建 CSR。

openssl req -out myServer.csr -newkey rsa:4096 -keyout myserver.priv.key -config myserver.config

我们使用 Windows 服务器作为我们的证书颁发机构。我们必须将 myServer.csr 复制到 Windows 框并运行以下命令:

certreq -submit -attrib "CertificateTemplate" myServer.csr myServer.cer

然后我们将 myServer.cer 复制回 Linux 服务器。

是否有可以向 Windows CA 提交 CSR 的 Python 库?或者 Bash 或 Powershell Core 中的一个选项?我想消除在此过程中手动来回复制文件的需要。

0 个答案:

没有答案