Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 446 Bytes

MISC.md

File metadata and controls

13 lines (7 loc) · 446 Bytes

Generate self signed certificate for code signing on Windows

Create certificate:

$cert = New-SelfSignedCertificate -DnsName broken-by.me -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My

Set the password for it:

$CertPassword = ConvertTo-SecureString -String "123456" -Force -AsPlainText

Export it:

Export-PfxCertificate -Cert "cert:\CurrentUser\My\$($cert.Thumbprint)" -FilePath "win-cert.pfx" -Password $CertPassword