Windowsで実行可能ファイルのコード署名を理解するために、独自の自己署名証明書を作成してファイルに署名しています。 signtoolはエラーを投げて、「指定されたすべての基準を満たす証明書が見つかりませんでした」と言っています。Windowsで署名できないsigntool
私は間違っていますか?ここで
は、私がやったものだ:
をMSや他のブログからいくつかの指示に従い、私はそうのような自己署名証明書を作成します。Get-ChildItemコマンドレットのコマンドを最後
New-SelfSignedCertificate -certstorelocation Cert:\LocalMachine\my -dnsname cameronnokes.com
$pwd = ConvertTo-SecureString -String "password" -Force -AsPlainText
Export-PfxCertificate -cert Cert:\LocalMachine\my\C7A94086D80A42151551A9FCCEACBC0B4A9ABA1A -FilePath 'C:\Users\Cameron Nokes\selfcert.pfx' -Password $pwd
Get-ChildItem -Recurse Cert:\LocalMachine\my
は、拇印を表示し、私はそれが期待されるように見えます。
は今、CMDに、私が実行します。
signtool.exe sign /f selfcert.pfx /p password /debug test.ps1
The following certificates were considered:
Issued to: cameronnokes.com
Issued by: cameronnokes.com
Expires: Sat Aug 05 12:37:28 2017
SHA1 hash: C7A94086D80A42151551A9FCCEACBC0B4A9ABA1A
After EKU filter, 0 certs were left.
After expiry filter, 0 certs were left.
After Private Key filter, 0 certs were left.
SignTool Error: No certificates were found that met all the given criteria.
コード署名拡張キーの使用方法で証明書を生成する必要があります。あなたはそうではありません。それが、EKUフィルタの後に残っていないという理由です。 New-SelfSignedCertificateでは、EKUを指定できないため、このために使用できません。 –