17 Mar 2008

Sign a CAB file

Create a Windows Mobile certificate:

http://www.codeproject.com/KB/mobile/signcode.aspx

Acheter un certificat :
Buy a certificate :
http://www.verisign.com/

Install the certificate with the CAB:

Copier le Cab sur le PDA et le lancer, attention si ce Cab n'est pas lui-même signé, un message d'avertissements est à accepter.
Copy the CAB file on the device and launch it, the cab is not signed, so you have to accept the warning message.

Sign the CAB and all its content:

Avec l'outil cabsigntool disponible lors de l'installation du SDK WM 6, C:\Program Files\Windows Mobile 6 SDK\Tools\Security\CabSignTool

With the tool cabsigntool available with the SDK WM 6.0, C:\Program Files\Windows Mobile 6 SDK\Tools\Security\CabSignTool


cabsigntool MyCAB.CAB MyCABSign.cab -f MyCert.pfx

CABSIGNTOOL: Signs a CAB and all its executable content (.exe, .dll)

with specified certificate(s).

Input CAB : MyCAB.CAB

Output CAB : MyCABSign.cab

signtool command line:-

for cab : -f MyCert.pfx

for files : -f MyCert.pfx


CABSIGNTOOL: Extracting CAB contents.

CABSIGNTOOL: Signing CAB contents.

Done Adding Additional Store

Successfully signed: C:\DOCUME~1\fdecret\LOCALS~1\Temp\CabDDA.tmp\000CRlib.003

Done Adding Additional Store

Successfully signed: C:\DOCUME~1\fdecret\LOCALS~1\Temp\CabDDA.tmp\ECHODI~1.004

Done Adding Additional Store

Successfully signed: C:\DOCUME~1\fdecret\LOCALS~1\Temp\CabDDA.tmp\ECHODI~1.005

Done Adding Additional Store

Successfully signed: C:\DOCUME~1\fdecret\LOCALS~1\Temp\CabDDA.tmp\VIDEOB~1.001

Done Adding Additional Store

Successfully signed: C:\DOCUME~1\fdecret\LOCALS~1\Temp\CabDDA.tmp\VIDEOI~1.002

CABSIGNTOOL: Re-packing CAB.

Microsoft (R) Cabinet Maker - Version 5.1.2600.2180

Copyright (c) Microsoft Corporation. All rights reserved..

Parsing directives (C:\DOCUME~1\fdecret\LOCALS~1\Temp\CabDDA.tmp\wizDDB.tmp: 1 l
1,097,294 bytes in 12 files
Total files: 12
Bytes before: 1,097,294
Bytes after: 1,097,294
After/Before: 100.00% compression
Time: 0.31 seconds ( 0 hr 0 min 0.31 sec)
Throughput: 3423.57 Kb/second

CABSIGNTOOL: Signing CAB.

Done Adding Additional Store

Successfully signed: MyCABSign.cab

CABSIGNTOOL: Done.

Install the signed CAB

Vous pouvez maintenant lancer vos CAB et vos applications signés avec le certificat et de fait ne plus avoir de message d'avertissement.

You can now launch your CAB file and your applications signed with the certificates and not have to accept the warning message.

No comments: