ebourg / jsign

Java implementation of Microsoft Authenticode for signing Windows executables, installers & scripts

Home Page:https://ebourg.github.io/jsign

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vbs with a comment containing a copyright glyph (©) fails to verify after signature.

johm6340 opened this issue · comments

Hello
If a vbs script file contains a line containing a copyright glyph , jsign signs it, but signtool fails to verify it .

To recreate , use notepad to create a test.vbs file and insert this line
' ©some text

Save it and sign . Then run signtool verify against it . it will fail with
SignTool Error: WinVerifyTrust returned error: 0x80096010
The digital signature of the object did not verify.

using the --encoding UTF-8 fixes this .

According to the jsign tools help text, I think that UTF-8 should be default .
so re-opening this for comment.

Does signtool generate a valid signature for the same file?

hi, yes it does .

Jsign already assumes UTF-8 by default for .vbs files but there is another issue. I think this is a duplicate of #123.

Could you try again with --encoding windows-1252 ?

it verifies just fine . so does --encoding UTF-8

looking at the file ( same if I create it in notepad or vim on widows) .
The hex looks like
27 c2 a9 73 6f 6d 65 20 74 65 78 74 0d 0a 0d 0a '©some text