Signing executables?

BlitzMax Forums/BlitzMax Programming/Signing executables?

JoshK(Posted 2014) [#1]
I'm trying to sign an executable with a signing tool. My programmers says that other EXEs work correctly, but the signature cannot be applied to any BMX EXE. He also sent an image that indicates maybe the signature header is there, but contains no data?


ziggy(Posted 2014) [#2]
Use BLIde publisher to enter this data, I think it should work if you use latest BLIde version. Also, depending how you've managed the GUI, you may be interested in enabling the "DPI Aware" flag in the published EXE (that's like the retina flag for windows, and tells the OS that the application is ready to be shown on systems with big typography settings).


JoshK(Posted 2014) [#3]
In the Publisher, there are fields for company, author, etc., but that is not what I am trying to do. I want to digitally sign the executable. The problem seems to be that there is already an empty digital signature section in the EXE when it is compiled.


xlsior(Posted 2014) [#4]
Perhaps something that could be tweaked through Brucey's alternate BMK?


ziggy(Posted 2014) [#5]
Is there any more details about this signing tool? I could take a look


skidracer(Posted 2014) [#6]
I would guess it has to do with which manifest file you are linking to. Does signing MaxIDE fail also?


ziggy(Posted 2014) [#7]
I would guess it has to do with which manifest file you are linking to.
I agree


JoshK(Posted 2014) [#8]
Attempting to sign MaxIDE produces the same error.


JoshK(Posted 2014) [#9]
Manel and Simon, I sent you both an example. It's in a .rar file so hopefully your email service will let it through.


skidracer(Posted 2014) [#10]
Not sure what I'm doing but I ran your bat that did some things and then failed.

Then I created test.c

#include <stdio.h>
void main()
{
printf("hello");
}

Then I built it gcc test.c

then I tried to sign the exe

vsign -sign a.exe

which gives me the error

ERROR! License file "steamlicense.txt" not found.

Without some docs I don't think I can be of much help.


skidracer(Posted 2014) [#11]
Ok, using this works

vsign -generatekeypair keyfile.txt steamsux
vsign -cachepassphrase keyfile.txt steamsux
vsign -signwith notepad.exe keyfile.txt

But not with my plain gcc generated a.exe. Will try MVC compiled helloworld to make sure it's not a gcc issue, then worry about manifests...


skidracer(Posted 2014) [#12]
A plain helloworld command line exe produced by VS2010 C++ also signs fine so my guess is this is an issue with gcc generated code. The command line project I created has all UAC and manifest stuff set to NO but the linker still seems to include some guff so not certain.


JoshK(Posted 2014) [#13]
Thanks, I posted a question for the vendor about this.


JoshK(Posted 2014) [#14]
They've confirmed that GCC exes presently aren't supported.


FBEpyon(Posted 2014) [#15]
http://blog.didierstevens.com/2008/12/31/howto-add-a-digital-signature-to-executables/

I was looking and I found this.. Is this what you are looking for..?


skidracer(Posted 2014) [#16]
JoshK, in the early days of BlitzMax I built a variant of BMK that used VS tool chain which may be possible solution for you.


JoshK(Posted 2014) [#17]
FBEpyon, thank you but I am using a signing tool from a different vendor.

JoshK, in the early days of BlitzMax I built a variant of BMK that used VS tool chain which may be possible solution for you.

If it works reliably, that certainly would help.


skidracer(Posted 2014) [#18]
Josh, will investigate this weekend.