簡體   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