Microsoft KB Archive/247257

= Steps for signing a .cab file =

Article ID: 247257

Article Last Modified on 12/6/2004

-

APPLIES TO


 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Explorer 4.01 Service Pack 1
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5

-



This article was previously published under Q247257



SUMMARY
This article describe the steps to sign a cabinet (.cab) file.



MORE INFORMATION
 The Microsoft .NET Framework software development kit (SDK) 1.1 includes the Crypto API files that you must have to sign a .cab file. To download the SDK, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en

 Use the following steps to sign and validate the .cab file:  Type the following at a command prompt to create a private key file, Mycert.pvk.

makecert -sv "mycert.pvk" -n "CN=My Company" mycert.cer

The file created in this step, Mycert.cer, is used to create an .spc file. Type the password in the dialog box. Create an .spc file from the certificate file with the correct password. To do so, type the following line at a command prompt:

cert2spc mycert.cer mycert.spc

Note that this step involves creation of a test private key. Alternatively, valid certificates can be created through Microsoft Certificate Server for Intranet use or purchased from external vendors for Internet use. Use the key information to sign the .cab file:

signcode -v mycert.pvk -spc mycert.spc new.cab -t [Timestamp server URL]

For more information about signtool, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/signtool.asp

Note Specify the timestamp server URL at this step. The timestamp server URL provides a place to enter or edit the location of a timestamp server. A timestamp server validates the date and time that the cabinet file was signed. Certificate files can expire after a certain period of time. Contact your certificate file provider (certificate authority) for the location of their timestamp server.

Starting with Platform SDK February 2003, signcode.exe has been replaced with signtool.exe.  Follow this procedure to validate a .cab file:  Type the following at a command prompt to run Setreg.exe on the client system with the TRUE value so that the test certificates are recognized:

setreg -q 1 TRUE

</li> Run Checktrust.exe to ensure that the CAB file is signing correctly:

chktrust new.cab

</li></ol>

Expected results

<pre class="fixed_text">mycab.cab: Succeeded

</li></ol>

<div class="references_section">