繁体   English   中英

生成由 Powershell 中的根证书签名的自签名证书

[英]Generate A Self Signed Certificate Signed By An Root Certificate in Powershell

如何使用 New-SelfSignedCertificate 生成由根证书签名的自签名证书,我有一个根证书我只想知道如何使用 -Signer。

您已经发现需要使用-Signer参数。 只需确保您拥有要用于签署新证书的证书的私钥。 所以基本上你只能使用来自Personal存储的证书(PowerShell 中的“我的”)。

例子:

# find a suitable certificate to use as root
ls Cert:\CurrentUser\My\
$root = ls Cert:\CurrentUser\My\c123a6f16a5f165161a1...  # use the thumbprint of one of your certificates

# create a certificate which is signed with your chosen root certificate
New-SelfSignedCertificate -DnsName test.local -Signer $root -CertStoreLocation Cert:\CurrentUser\My\

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM