Signing Packages without exposing the password of the certificate

mauro
2023-03-31
2024-08-20
  • mauro - 2023-03-31

    Using Microsoft signtool.exe I can install the certificate inside my PC and then use the certificate to sign the file without providing the password. Is there a flag to do the same using PackageManagerCLI.exe?

    This would be a very welcome feature as otherwise I would be forced to leave the certificate password inside a batch file which does not seem to me to be acceptable from the security point of view.

    Microsoft sign tool:
    signtool.exe sign /td SHA256 /fd SHA256 /f myCertificateFile.pfx /p myCertificatePassword /tr ...
    signtool.exe sign /td SHA256 /fd SHA256 /n "My Certificate Name"                          /tr ...
    
    CODESYS/3S sign too:
    PackageManagerCLI.exe --pkcs12Path="myCertificateFile.pfx" --pkcs12Passwd="myCertificatePassword" --tsaTimestampServiceUrl= ...
    PackageManagerCLI.exe --pkcs12????="My Certificate Name"                                          --tsaTimestampServiceUrl= ...
    

    Thanks in advance for your suggestions
    Mauro

     
  • kevinrn - 2024-08-20

    Indeed, I'm also seeking a solution for this issue. The main challenge we face is the requirement to use EV (Extended Validation) Certificates. Due to security considerations, it's not possible—nor is it ever recommended in such cases—to export the certificate with its private key.

     

Log in to post a comment.