![](/img/trans.png)
[英]How to get Azure Key Vault secret using powershell with certificate auth?
[英]How to create an certificate with 2 key usages using powershell 5
我需要创建一个自签名证书来使用MimeKit.MimeKit测试签名的电子邮件。 它需要以下KeyUsages:
根据文档,此powershell命令应创建它:
New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname tosign.mycompany.pt, mycompany.pt, mycompany.pt -KeyLength 4096
-keyUsage "DigitalSignature, NonRepudiation"
但它抛出:
New-SelfSignedCertificate : Cannot bind parameter 'KeyUsage'. Cannot convert value "DigitalSignature, NonRepudiation"
New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname osign.mycompany.pt, mycompany.pt, mycompany.pt -KeyLength 4096 -keyUsage DigitalSignature,NonRepudiation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.