Few month ago a was able to successfully sign CAB file with test certificate I have created on my server. Here are the steps I have taken:
makecert.exe -sv "Demo.pvk" -n "CN=Demo Company,[email protected]" "Demo.cer"
cert2spc.exe "Demo.cer" "Demo.spc"
pvk2pfx.exe -pvk "Demo.pvk" -pi "pvk_password" -spc "Demo.spc" -pfx "Demo.pfx" -po "pfx_password"
signtool.exe sign /f "Demo.pfx" /p "pfx_password" /v "D:\Setup.cab"
All the steps are successfull except the last one with signtool that returns: "The signer's certificate is not valid for signing". I have done the research on web about this error but nothing did actualy solved my problem. This error is usualy created because pfx has expired but this is not the case here. I have successfully imported certificate to local cert store and checked it's validity.
Why I am not able to sign CAB with my pfx any more even if I recreate it? Is there some windows update responsible for this change?
I am open to suggestions for any other way to sign CAB with pfx using command prompt.