View Full Version : signing dll (WM5)
jpa
5th December 2005, 09:33 AM
Hi,
I am trying to sign some dlls with the SDKSamplePrivdeveloper certificate and I have alaways the same error : errorcode 0x80070057.
I use Visual Studio 2005 and Windows Mobile 2005 SDK. I tried with the wizard "signtool signwizard" and the prompt cmd "signtool sign /f SDKSamplePrivDeveloper.pvk my_dll.dll" ...
I tried also to build a cab, cab to install my dll, and when I try the cab on my Universal, I have the message "....can't be installed..."
Any help will be welcome :D
Thanks
jpa
5th December 2005, 07:24 PM
Well, I understood where was my mistake... So now I have a new question : where can I found the password for the sdksampleprivdeveloper.pfx ?
Thanks
mamaich
6th December 2005, 12:39 AM
it does not have a password
jpa
6th December 2005, 09:06 AM
thanks and sorry for my newbie questions. I understood that I had to import SDKSamplePrivDeveloper.cer first to my depository and after SDKSamplePrivDeveloper.pvk. FOr SDK....cer no issue but for SDK....pvk cermgr.msc asks me a password :(
thanh_lam
6th December 2005, 02:28 PM
Hi All!
I tried to sign my dll files. For the first time I sign a dll file that doesn't concern with ppc , cmd command :
"signtool sign /f SDKSamplePrivDeveloper.pfx satelite.dll"
It was success to sign, but when I tried to sign dll files that were dumped from PPC wm 2005 on Himalaya , command :
"signtool sign /f SDKSamplePrivDeveloper.pfx shellres.dll"
Done adding aditional store
Signtool error: Isigncode::Sign return error 0x80070057
The parameter is incorrect.
Signtool error; An error orrcurred while attempting to sign: shellres.dll
or:
"signtool sign /f SDKSamplePrivDeveloper.pvk shellres.dll"
Signtool error: IStore2::Load return error 0x80092009
Cannot find the request object
Signtool error; An error orrcurred while attempting to load the signing certificate from: SDKSamplePrivDeveloper.pvk
Can any one help me to sign these files?
jpa
6th December 2005, 03:25 PM
I found this :
SYMPTOMS
Attempting to digitally sign a file using Signcode.exe results in the following error:
Unable to sign the program xxxxx: (0x80070057)
CAUSE
The current version of Signcode.exe that ships with the ActiveX SDK, Ms Authenticode(IE4) and MS Authenticode(IE5) tools is unable to sign 16-bit files.
RESOLUTION
One workaround is to wrap the 16-bit file in a .cab or a self-extracting executable, which can then be digitally signed using Signcode.exe.
Note that only the 32-bit version of Internet Explorer requires a digital signature; 16-bit Internet Explorer does not check for signatures, and should therefore be able to download an unsigned 16-bit file.
mamaich
7th December 2005, 12:45 AM
It was success to sign, but when I tried to sign dll files that were dumped from PPC wm 2005 on Himalaya , ...
The files in "modules" directory are not normal EXE/DLLs - they are XIP! They would never work on real device without hand-editing. Most values in their PE-header are zeroed, all sections are joined into one, all DLLs don't have relocations section.
jpa
7th December 2005, 01:23 AM
so, mamaich can you explain how sign dlls like was signed all the dlls on the last realVGA hack? I need to modify msim.96.dll to retreive an azerty keyboard ..
thanks
ctho24
7th December 2005, 03:01 AM
it does not have a password
.pfx file is the pkcs#12 standard which containing the key pair in the file. YES, it is protected by a PIN (i called it PIN instead of a password). :wink: But I'm sorry I don't know the PIN :?
BeyondtheTech
7th December 2005, 04:12 PM
I found this program, easy to use and the Test Certificates work on both Smartphone and Pocket PC.
Just type sign filename.ext and it'll add/replace the digital signature at the end.
jpa
7th December 2005, 04:18 PM
thanksssssssssssssssssssssss !
jpa
7th December 2005, 04:37 PM
works great for a cab but not for my dll msimfr.192.dll (dumped from my qtek 9000 with buzz rom dumper) :(
I found this program, easy to use and the Test Certificates work on both Smartphone and Pocket PC.
Just type sign filename.ext and it'll add/replace the digital signature at the end.
BeyondtheTech
7th December 2005, 04:51 PM
I've used it on EXEs and DLLs without a problem... CAB files, well, it doesn't matter since even with a re-signed CAB file, it still comes up as something "untrusted." What error message are you getting?
jpa
7th December 2005, 05:04 PM
Same message :
Error: Signing Failed. Result = 80070057, (-2147024809)
Here is my dll :
thanh_lam
7th December 2005, 05:07 PM
I found this program, easy to use and the Test Certificates work on both Smartphone and Pocket PC.
Just type sign filename.ext and it'll add/replace the digital signature at the end.
Mr Maimach sent these to me month ago. But I couldn't sign my files which were dumped form PPC WM5. As Maimach say these "modules" files haven't PE header, they are XIP file, and they no longer work in a real device.
When I edited these file in Visual studio 2005 (support unicode) and changed some strings form english to vietnamese, after that I save these files by save button, and when I edited these again, no change was made.
At This tIme I think these files were protected by MS, and they didn't allow us to change. But when I read this thread, the answer is clearly, these dll files were corrupted.
Can any one help me archive these dll files but not the XIP files?
jpa
7th December 2005, 05:13 PM
So how do they do the last RealVGA Hack as all the dlls are signed ?
jpa
8th December 2005, 11:44 AM
noone to help a poor newbie ?
thanh_lam
8th December 2005, 02:02 PM
I'm a very poor newbie too, I'm trying to make free Vietnamese Language package for WM2005, all things seem tobe done, but these problems make the life becomming difficulty . Until now no one can solve these, and hope in the recent days the solution will be fuzzzzzzzzzzzzzz
mamaich
9th December 2005, 08:25 AM
Same message :
Error: Signing Failed. Result = 80070057, (-2147024809)
Here is my dll :As I've wrote several times before. All XIP DLLs produced by my tool would not work on real device. They don't contain relocs, and their PE-header is incorrect. You should manually set image size and other fields in PE-header, and don't forget to set the correct characteristics (the process is obvious if you know the PE format). Or here is a better approach - take any working resource-only DLL from your device, and place your resources into it.
buzz_lightyear
9th December 2005, 09:00 AM
I found this program, easy to use and the Test Certificates work on both Smartphone and Pocket PC.
Just type sign filename.ext and it'll add/replace the digital signature at the end.
cool, good one..
THANX
buzz
jpa
9th December 2005, 09:02 AM
Same message :
Error: Signing Failed. Result = 80070057, (-2147024809)
Here is my dll :As I've wrote several times before. All XIP DLLs produced by my tool would not work on real device. They don't contain relocs, and their PE-header is incorrect. You should manually set image size and other fields in PE-header, and don't forget to set the correct characteristics (the process is obvious if you know the PE format). Or here is a better approach - take any working resource-only DLL from your device, and place your resources into it.
Thanks. As I don't know "PE-header" and I don't know where I can found documentation on it (format, tools to change it..) I am going to try the 2nd method. So if I understand correctly I have to take a dll not XIP from my dumped rom (cdzsvcctlres.dll for example), and to export on it the ressources from my XIP dll (msimfr.192.dll for example) and to save and to rename the new dll (msimfr.96.dll for example) ? A tool like PE-Explorer is it the right tool to do it ?
Thanks again
thanh_lam
9th December 2005, 09:28 AM
But the PE header is the same for all dll files in device ?
thanh_lam
9th December 2005, 10:53 AM
Thanks Maimach!
I did as the second way, I signed it successfully, but I don't know my mui files will work or not, now I'm in session, after session i will test it.
@jpa
for adding and replacing resources needn't PE Explorer need only Visual Studio 2005, it's done well.
jpa
9th December 2005, 11:34 AM
Good news. I will try it also later. Juste a question : with some Dlls few ressources can't be edited or remplaced (bitmap 15365 for example with msim.dll) so how can we do to solve this ?
Thanks
thanh_lam
9th December 2005, 11:52 AM
Yeahhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Good news become, My shellres.dll mui file works well, thanks Maimach alot.
Vietnamese language is enable on my Emulator.
I did like this :
I take a file, for example rfileshell.dll(has PE header) on my device, delete all recource in it by visual studio 2005 and copy resource from my file shellres.dll and save as mui file.
and signed it by tool .
It works. Great !!!
Asukal
13th December 2005, 03:22 AM
Guys! great works!!!
I will also try that!! but seems to be long way!
need a patience!!
Anyway, thanks good news!
And this is gift for you!
Asukal
13th December 2005, 04:56 AM
i tested on Emulator, it worlks :D
but unfortunatry, on my jasjar, i may not work.
Just like replacement of wince.nls on windows folder.
wince.nls can be replaced on emulator. but on the real device, it couldnt read.
i think just same thing it wad. :cry:
we must work again!
buzz_lightyear
13th December 2005, 09:40 AM
Hi Asukal,
i think, that you also need to install this root certificate on your device.
buzz
Asukal
13th December 2005, 10:18 AM
thanks, Buzz!
i tried that CAB now.
still cant..................
but once changed the following registry, strange things had happend!
[HKEY_LOCAL_MACHINE\MUI]
"Enable"=dword:00000000 --------------1 as default
"SysLang"=dword:00000409
changed 1 to 0,
1:i injected to ROM jawress.dll.0401.mui (bubble game)
(just picked out from Japanese Emu, and changed ext 0411 to 0409.
not signed.
Seems to OS is trying to read this. result was Bubble game cant open
correctly.
this must do something, but this is the evidence it was read, no matter failed to open or not)
2:just copy to windows folder the Shellres.dll.0411.mui
dll from device, and made it empty, then Japanese Resorece were addapted, and also signed.
it was ignored. do you get sommething in this results??
Topogigi
14th December 2005, 08:48 AM
Here's the results of my tests on it:
I stripped all the resources out of a shellres.dll.0410.mui dumped from a real italian Qtek 9000.
I added all the resources in a blanked .dll.mui
I finally renamed the blank .dll.mui with all the added resources and copied back to my device as shellres.dll.0410.mui
It does not work. The file seems to be valid (it also opens correctly in all the resource editors I have installed on my pc in the meanwhile) and it does have a relocation section, but it does not load on the real device at runtime. You can also delete it in the runtime, so i am sure it's really ignored from the OS at all.
It seems to me that the .dll.mui that are dumped or extracted as modules simply cannot work if they are turned into files. Perhaps they are checked in the first phase of the boot process when only IMGFS is mounted, so when all the partitions are mounted, it's too late for the OS to become aware of their existence on the device... :cry:
Any suggestion?
thanh_lam
14th December 2005, 02:37 PM
Here's the results of my tests on it:
I stripped all the resources out of a shellres.dll.0410.mui dumped from a real italian Qtek 9000.
I added all the resources in a blanked .dll.mui
I finally renamed the blank .dll.mui with all the added resources and copied back to my device as shellres.dll.0410.mui
It does not work. The file seems to be valid (it also opens correctly in all the resource editors I have installed on my pc in the meanwhile) and it does have a relocation section, but it does not load on the real device at runtime. You can also delete it in the runtime, so i am sure it's really ignored from the OS at all.
It seems to me that the .dll.mui that are dumped or extracted as modules simply cannot work if they are turned into files. Perhaps they are checked in the first phase of the boot process when only IMGFS is mounted, so when all the partitions are mounted, it's too late for the OS to become aware of their existence on the device... :cry:
Any suggestion?
did you sign it?
thanh_lam
14th December 2005, 03:22 PM
please try this, this file Mr Maimach sent me months ago:
Topogigi
14th December 2005, 04:53 PM
Ok, finally it works. You have to load the .dll.mui as a module in rom, cooking your own rom (thanks Mr. Mamaich for your imgfs tools!). But be aware that you need to strip the header from the original .dll.mui and to adjust manually all the parameters listed in imageinfo.bin for that file before rebuilding the rom image (and that's not so easy, trust me!) But it works!!!!!
windkiss
12th June 2006, 10:47 AM
Hi all,
I'm searching for LEng for English OS.
My PDA is rx1950 WM5.0 Korean vesion. So I want to change the OS interface into English.
Is have anyone can help me?
Please!!!!
OdeeanRDeathshead
29th October 2006, 01:31 PM
I used the signcode tool to sign my exe then I copied the certificate to the device and installed it. This works fine, but is there any way to install the certificate without the user getting an anoying yes/no box. My hope is to include the data from the certificate in my exe as a reasource then copy it out to a file when needed on the device. I want my program to install its own certificate without the need for confirmation. IMO the user would not have or tap on my program if they did not want to run it so why should I force them to deal with that. I could just find the location of the window (yes button) in question then symulate a tap there but that seems like a nasty solution.
http://odeean.veritel.com.au/images/BadVista_no_littering.gif (http://badvista.fsf.org/)
Jimm98y
29th October 2006, 01:46 PM
I tried to create shellres.dll.mui from RFileShell.dll and it works fine, but the file is too big. If I add my resources into RFileShell.dll then the size of this file is 287kB + size of my resources = 404kB! Does anybody know any smaller dll with PE header, which can be used?
levenum
29th October 2006, 02:02 PM
It is possible. You do not need a resource, as the certificate is just a binary value in registry.
Trouble is unless your EXE is signed by and already known certificate there is no way to launch it without the YES/NO question.
Location of certificates is:
HKLM\Comm\Security\System Certificates
Under that keys with categories (privileged, unprivileged etc) under that a key for every certificate (look at its thumb print in properties for key name).
Import a certificate on one device then copy out its key and recreate on other devices.
OdeeanRDeathshead
29th October 2006, 02:30 PM
doh, I wasn't thinking.
What about the thread that executes code in a today item. If I have one program that is already signed (the user pressed ok) can it place a dll (that it creates on the fly) for the today screen then add to registry without having to be asked about that dll. I have a few ideas about programs/pluggins I would like to program but I feel that users I know do not like cabs and prefer to just beam each other exe files that require no more interaction to work.
levenum
30th October 2006, 08:37 AM
Nope, not only today plug-ins but any DLLs used (even by signed) apps pop up their own YES / NO question.
The only way to avoid this is for your program to sign DLLs it distributes. I know this can be done with API on Windows XP machine (there is a whole set of API for handling certificates and images, I even manage to put together a quick cert remover), but I am not sure about WM platform.
sudheshnac
26th March 2007, 01:47 PM
Hi BeyondTheTech !
can you please let me know the steps one need to follow to succesfully sign an EXE/DLL ?
I found this program, easy to use and the Test Certificates work on both Smartphone and Pocket PC.
Just type sign filename.ext and it'll add/replace the digital signature at the end.
utak3r
19th November 2007, 09:11 AM
Mamaich, Topogigi...
Could you explain the process of editing a module? Should I strip PE header from a working dll and put it into S000, or what?...
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.