【问题标题】:How do you generate keys for Authenticode signing?您如何为 Authenticode 签名生成密钥?
【发布时间】:2014-04-22 15:40:01
【问题描述】:

如何生成用于 Authenticode 签名的原始公钥/私钥?我在教程中看到这样的命令:

pvk2pfx.exe -pvk mykey.pvk -pi <password> -spc mycert.spc -pfx mycert.pfx -po <password>

但他们一开始并没有说明如何获取私钥。

【问题讨论】:

    标签: public-key-encryption authenticode


    【解决方案1】:

    为了测试,您可以生成自签名证书:

    REM May change depending of your installed Windows SDK
    cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin"
    
    REM Generate the root certificate
    .\makecert.exe -r -pe -n "CN=Sample.CA" -ss CA -sr CurrentUser -a sha1 -cy authority -sky signature -sv d:\Sample.CA.pvk d:\Sample.CA.cer
    
    REM Add the Root certificate to the user store
    certutil.exe -user -addstore Root d:\Sample.CA.cer
    
    REM Create the certificate for code signing
    .\makecert.exe -pe -n "CN=Sample.CodeSigning" -eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" -a sha1 -cy end -sky signature -ic d:\Sample.CA.cer -iv d:\Sample.CA.pvk -sv d:\Sample.CodeSigning.pvk d:\Sample.CodeSigning.cer
    
    REM Convert to certificate to pfx file format
    .\pvk2pfx.exe -pvk d:\Sample.CodeSigning.pvk -spc d:\Sample.CodeSigning.cer -pfx d:\Sample.CodeSigning.pfx
    

    【讨论】:

      【解决方案2】:

      根据 Twitter 的回答,“您需要从 CA 获得第 3 类代码签名证书。”

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2020-07-01
        • 2016-03-08
        • 1970-01-01
        • 2016-02-09
        • 1970-01-01
        • 2016-08-19
        • 1970-01-01
        相关资源
        最近更新 更多