This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- Getting an "Error: Bad Length." when attempting sign
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Getting an "Error: Bad Length." when attempting sign
Getting an "Error: Bad Length." when attempting sign
Summary
Getting an "Error: Bad Length." when attempting signSymptoms
When attempting to sign with certain certificates the user gets "Error: Bad Length." when using isign.exe to sign. .exe and .hdr files.
Converting the spc and pvk files to a pfx allows it to sign .exe files with signtool.exe
Specifying the spc and pvk file in the signing tab of the release in the IDE also signs without error if One-Click install is set to No. Will fail with a -7274 error if set to Yes.
Cause
This appears likely to be related to the scenario discussed on MSDN where a 2048-bit key is not handled on Windows 7 with the base provider, but is on Windows Vista and earlier. CryptImportPublicKeyInfo returning NTE_BAD_LEN for 2048-bit keys on Win7
Workaround
Add -cp "Microsoft Enhanced Cryptographic Provider v1.0" to the command line:isign.exe -spc webclientIE.spc -v webclientIE.pvk -cp "Microsoft Enhanced Cryptographic Provider v1.0" setup.exe
Additional Information
CryptImportPublicKeyInfo returning NTE_BAD_LEN for 2048-bit keys on Win7
No ratings