简体   繁体   中英

Generate A Self Signed Certificate Signed By An Root Certificate in Powershell

How To Generate A Self Signed Certificate Signed By An Root Certificate using New-SelfSignedCertificate, I Have A Root Certificate I Just Want to Know How To Use -Signer.

You already figured out that you need to use the -Signer parameter. Just ensure that you have the private key for the certificate you want to use to sign the new certificate. So basically you can only use certificates from the Personal store ("My" in PowerShell).

Example:

# 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\

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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