I can't get primalscript to sign a VBS script. The error message is "Could not load the specified certificate".
I am using a verisign-generated code signing cert. As primalscript doesn't like .SPC and .PVK files, I used the standard microsoft utility pvkimprt to incorporate both keys into a .pfx file. The certificate has been imported into my certificate store, and it doesn't show any errors, and the certificate certainly hasn't expired.
If I leave the tools->options->wsh certificate field blank, then it says I must enter the .PFX file before signing, so at least I know it is trying to look at this file.
I also imported the certificate into my default store.
My development PC is Windows XP 64, is that a problem?
Error when code signing VBS script
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Error when code signing VBS script
Under Options - Script Settings - Script Security, when you click View Certificates do you see your certificate under the Personal tab? The certificate needs to be installed in the personal or user store.
Error when code signing VBS script
Yes ... It reports under Personal
Issued To: SANtools, Inc.
Issued BY: Verisign Class 3 Code Signing
Experiation date 9/13/2007
Friendly Name <None>
Nothing unexpected in the Genera/Details area if I inspect it, other than it says I have a private key that corresponds to this certificate.
The Certification Path is
Verisign Class 3 Public Primary CA -> Verisign Class 3 Code Signing 2004 CA -> SANtools, Inc.
Certificate Status reports: "This certificate is OK"
Issued To: SANtools, Inc.
Issued BY: Verisign Class 3 Code Signing
Experiation date 9/13/2007
Friendly Name <None>
Nothing unexpected in the Genera/Details area if I inspect it, other than it says I have a private key that corresponds to this certificate.
The Certification Path is
Verisign Class 3 Public Primary CA -> Verisign Class 3 Code Signing 2004 CA -> SANtools, Inc.
Certificate Status reports: "This certificate is OK"
Error when code signing VBS script
Under Options, where it says Certificate, type in SANtools, Inc. click OK and then try signing a script.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Error when code signing VBS script
PrimalScript uses Microsoft's Script Signer component to sign scripts. It is not impossible that this simply does not work under a 64bit OS.
Try to run the script used in this article:
http://msdn.microsoft.com/library/defau ... 2a262e.asp
Alex
Try to run the script used in this article:
http://msdn.microsoft.com/library/defau ... 2a262e.asp
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Error when code signing VBS script
No luck, but hopefully problem is with input parameters.
I stripped it down to a 2-line VBS script called TestSigner.VBS
If I enter "cscript TestSigner.VBS" using code below then it works fine on my WinXP64 system.
Set objSigner = WScript.CreateObject("Scripting.Signer")objSigner.SignFile "C:ScratchScriptTosign.vbs", "SANtools, Inc.", "my"
So this points to some incompatibility with the .PFX file ? When I used the MSFT utility to build a PFX cert out of my .SPC / .PVK files it did give me a few choices. Do you have specifics of what responses I should say?
Otherwise, any way to just read it out of the certificate store?
I stripped it down to a 2-line VBS script called TestSigner.VBS
If I enter "cscript TestSigner.VBS" using code below then it works fine on my WinXP64 system.
Set objSigner = WScript.CreateObject("Scripting.Signer")objSigner.SignFile "C:ScratchScriptTosign.vbs", "SANtools, Inc.", "my"
So this points to some incompatibility with the .PFX file ? When I used the MSFT utility to build a PFX cert out of my .SPC / .PVK files it did give me a few choices. Do you have specifics of what responses I should say?
Otherwise, any way to just read it out of the certificate store?
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Error when code signing VBS script
Does the script still work when you leave the last parameter off?
Set objSigner = WScript.CreateObject("Scripting.Signer")objSigner.SignFile "C:ScratchScriptTosign.vbs", "SANtools, Inc."
Set objSigner = WScript.CreateObject("Scripting.Signer")objSigner.SignFile "C:ScratchScriptTosign.vbs", "SANtools, Inc."
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Error when code signing VBS script
Yes, it works. Not only that, but if I truncate "SANtools, Inc." to just "SANtools" then it works. (If I remove this parameter completely, then I get error msg about wrong number of parameters.
Error when code signing VBS script
Re:
If I just enter "SANtools, Inc." as certificate name in tools->options, then it gives me the error message below when I attempt to sign it via PrimalScript
An exception occured when signing the script".
dlethe2007-02-14 14:35:03
If I just enter "SANtools, Inc." as certificate name in tools->options, then it gives me the error message below when I attempt to sign it via PrimalScript
An exception occured when signing the script".
dlethe2007-02-14 14:35:03
Error when code signing VBS script
So if "SANtools" works with the script signer object, then use that name as the certificate.