Setting Key Usage attributes with Makecert

前端 未结 4 1215
故里飘歌
故里飘歌 2021-02-18 21:43

Is it possible to set Key Usage attributes using makecert, or any other tool I can use to generate my own test certificates?

The reason I\'m interested is that certifica

4条回答
  •  感动是毒
    2021-02-18 22:37

    Digital Signature,Data Encipherment and Key Encipherment can be add by using the PowerShell Cmdlet New-SelfSignedCertificate. One of the New-SelfSignedCertificate Parameters is KeyUsagewhere you can add DigitalSignature, DataEncipherment and KeyEncipherment.

    New-SelfSignedCertificate is described on technet (https://technet.microsoft.com/library/hh848633)

    Sample:

    New-SelfSignedCertificate -Type Custom -Subject "CN=sample.com" -KeyUsage DataEncipherment, KeyEncipherment, DigitalSignature -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2,1.3.6.1.5.5.7.3.1") -CertStoreLocation "Cert:\CurrentUser\My"
    

    The sample covers client authentication and server authentication and creates the certificate at the current user store under my.

提交回复
热议问题