How to sign satellite assembly with .pfx file

J

Jaakko Salmenius

I have an application using strong names. VS signs the application when
compiling the assembly file. After that I create localized satellite
assembly files manually from my makefile. Until now I used .snk file to sign
the assemblies. Using it was easy to sign the satellite assembly files when
creating them using AL.exe

AL.exe /keyf:"MyFile,snk" ...

Now when I switch .pfx files I can not use /keyf optiosn any more. AL.exe
does not accept .pfx files. I tried signtool.exe but it does not sign the
satellite assembly files.

How can I sign my satellite assembly files?

Best regards,
Jaakko
 
J

Jaakko Salmenius

I tested Signtool a bit more because all documentation (the little I found)
point out to signtool and tells to use it.

However it does not work It seems to work as this dupm shows.

D:\Src\C#\Sign\bin\Debug\fi>c:signtool sign /f Sample.pfx /p mypassword
Sign.resources.dll
Done Adding Additional Store
Successfully signed: Sign.resources.dll

BUT when I view the assembly in ILDASM there is no signing.

/ Metadata version: v2.0.50727
..assembly Sign.resources
{
.hash algorithm 0x00008004
.ver 1:0:0:0
.locale = (66 00 69 00 00 00 ) // f.i...
}
..mresource public Sign.Form1.fi.resources
{
// Offset: 0x00000000 Length: 0x0000010B
}
..mresource public Sign.Properties.Resources.fi.resources
{
// Offset: 0x00000110 Length: 0x000000B4
}
..module Sign.resources.dll
// MVID: {0650E2B8-DC7B-40AD-BFBA-F7022A7537C7}
..imagebase 0x00400000
..file alignment 0x00000200
..stackreserve 0x00100000
..subsystem 0x0003 // WINDOWS_CUI
..corflags 0x00000001 // ILONLY
// Image base: 0x02FD0000

The original file contains signing:

.publickey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 //
..$..............
00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 //
..$..RSA1........
83 34 D6 D0 07 6B 00 25 63 24 A5 93 CE 3C 72 A6 //
..4...k.%c$...<r.
4F EC F3 8D 92 6D EC C2 F9 A4 7B D5 39 FC 75 2D //
O....m....{.9.u-
9C 43 A9 01 09 84 23 F0 42 C2 3C 59 5C E1 D1 B9 //
..C....#.B.<Y\...
4D 84 A3 AB B1 A8 C2 75 10 78 7F 41 CC 69 28 49 //
M......u.x.A.i(I
F5 4B 32 AE 55 75 DA 75 30 2A 36 8A BC C7 9F 23 //
..K2.Uu.u0*6....#
22 E6 85 77 72 A4 E5 12 96 33 0B 11 BB 81 71 1A //
"..wr....3....q.
7C 1F 6B 7F F6 55 C3 B9 73 E4 A1 61 05 8B 2E 0D //
|.k..U..s..a....
42 CE 08 77 14 90 2D 34 35 B6 26 6D 06 5B A1 C5 ) //
B..w..-45.&m.[..

Best regards,
Jaakko
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top