针对我们的点到站点VPN,我们希望创建根证书。 这样,我们可以为所有需要登录我们的VPN的合作伙伴创建任意数量的客户端证书。(Azure虚拟网络)
手动执行此操作效果很好。我们生成一个充当根CA的证书(自签名)。我们可以像这样在PowerShell中执行此操作:
$cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature -Subject "CN=Kratos Point To Site VPN Root Certificate Win10" -KeyExportPolicy Exportable -HashAlgorithm sha256 -KeyLength 2048 -CertStoreLocation "Cert:\CurrentUser\My" -KeyUsageProperty Sign -KeyUsage CertSign
$clientCert = New-SelfSignedCertificate -Type Custom -KeySpec Signature -Subject "CN=Digicreate Point To Site VPN Client Certificate Win10" -KeyExportPolicy Exportable -HashAlgorithm sha256 -KeyLength 2048 -CertStoreLocation "Cert:\CurrentUser\My" -Signer $cert -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2")
然而,我们更喜欢使用密钥保管库来管理证书。这个想法是通过使用以下命令直接在密钥保管库中创建证书: Add-AzureKeyVaultCertificate (私钥不可导出)
创建根证书非常完美。但我无法找到如何使用密钥保管库中的“签署”操作签署新证书的方法。
您有任何关于如何完成此操作的示例吗?
密钥保管库就像存储证书的存储库
,我们无法使用密钥保管库中的签名操作对CertificateSignRequest进行签名。 - Jason Ye