PRB: Unable to Sign the Cabfile When Running Signcode

Last reviewed: January 29, 1998
Article ID: Q177178
The information in this article applies to:
  • SDK for Java, versions 1.0, 1.5, 1.51 on the following platforms: NT, Win95, x86

SYMPTOMS

When you run Signcode.exe on your CAB file, one or more of the following errors occur:

  • Unable to sign the program <cabfile>. (80004005)
  • Unable to sign the program <cabfile>. (80030070)
  • Unable to sign the program <cabfile>. (80070005)
  • Unable to sign the program <cabfile>. (80070057)

CAUSE

Signcode.exe could not sign the CAB file for the reason indicated by the error number. The CAB file may not have been created with -s 6144 parameter or it is either read-only or corrupt.

RESOLUTION

Unable to sign the program <cabfile>. (80004005)

This error appears because you did not reserve space in your CAB file. Re- create the CAB file using the -s 6144 option to Cabarc.exe. This space must be reserved in the CAB file to allow room for the digital signature. It is not necessary to use the -s switch with the signing tools included with the SDK for Java 2.0 Beta2 or newer. The Signcode.exe utility now creates the necessary space for the certificate at the time the CAB is signed.

Unable to sign the program <cabfile>. (80030070)

This error occurs because you did not reserve enough space in your CAB file. Re-create the CAB file using the -s 6144 option to Cabarc.exe. It is not necessary to use the -s switch with the signing tools included with the SDK for Java 2.0 Beta2 or newer. The Signcode.exe utility now creates the necessary space for the certificate at the time the CAB is signed.

Unable to sign the program <cabfile>. (80070005)

This error appears because your cabfile is marked read-only.

Unable to sign the program <cabfile>. (80070057)

This error occurs because your cabfile is corrupt.

STATUS

This behavior is by design.

MORE INFORMATION

To use the -s option for Cabarc.exe, the -s 6144 option reserves unnecessary space in most situations. With the "test" certificate, you can typically get by with 1K of reserved space in the cab. A good estimate of the space required is slightly larger than the size of the .spc file you are signing with. Also note, it is possible that the certificate will require more than 6144 bytes.

Example

C:>CABARC -s 6144 N mycab *.class

NOTE: It is not necessary to use the -s switch with the signing tools included with the SDK for Java 2.0 Beta2 or newer. The Signcode.exe utility now creates the necessary space for the certificate at the time the CAB is signed.

REFERENCES

For additional information on Frequently Asked Questions for CAB files, please refer to the following Knowledge Base article:

   ARTICLE-ID: Q168941
   TITLE     : INFO: Frequently Asked Questions for CAB Files

For more information on Cab and Sign technology, look in the Cab&Sign folder on the Visual J++ CD-ROM. The Visual J++ CD-ROM also includes a sample called CabAndSign that gives step-by-step instructions on how to create Cab files and Test Certificates. For the latest info on CAB technology, refer to http://www.microsoft.com/workshop/prog/cab/.

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/visualj/
   http://support.microsoft.com/support/java/

(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Carl Frisk, Microsoft Corporation


Additional query words: CABARC, Cab and Sign technology, internet

Keywords : kberrmsg JCab
Technology : kbInetDev
Version : WINDOWS:1.0,1.5,1.51
Platform : Win95 winnt
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.