log.finer("Created .DSA file");
if (Configuration.DEBUG) log.fine("Created .DSA file");
  void start() throws Exception  {    log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$    JarFile jarFile = new JarFile(main.getJarFileName());    SFHelper sfHelper = new SFHelper(jarFile);    sfHelper.startSigning();    // 1. compute the digests    for (Enumeration e = jarFile.entries(); e.hasMoreElements(); )      {        JarEntry je = (JarEntry) e.nextElement();        String jeName = je.getName();        if (jeName.equals(JarFile.MANIFEST_NAME)            || jeName.endsWith(File.separator))          continue;        sfHelper.updateEntry(je);        if (main.isVerbose())          System.out.println(Messages.getString("JarSigner.1") + jeName); //$NON-NLS-1$      }    sfHelper.finishSigning(main.isSectionsOnly());    if (main.isVerbose())      System.out.println(Messages.getString("JarSigner.2") + JarFile.MANIFEST_NAME); //$NON-NLS-1$    // 2. write jar entries and manifest    File signedJarFile = File.createTempFile("gcp-", ".jar"); //$NON-NLS-1$ //$NON-NLS-2$    FileOutputStream fos = new FileOutputStream(signedJarFile);    JarOutputStream outSignedJarFile = new JarOutputStream(fos,                                                           sfHelper.getManifest());    for (Enumeration e = jarFile.entries(); e.hasMoreElements(); )      {        JarEntry je = (JarEntry) e.nextElement();        String jeName = je.getName();        if (jeName.equals(JarFile.MANIFEST_NAME)            || jeName.endsWith(File.separator))          continue;        log.finest("Processing " + jeName); //$NON-NLS-1$        JarEntry newEntry = new JarEntry(jeName);        newEntry.setTime(je.getTime());        outSignedJarFile.putNextEntry(newEntry);        InputStream jeis = jarFile.getInputStream(je);        copyFromTo(jeis, outSignedJarFile);      }    // 3. create the .SF file    String signaturesFileName = main.getSigFileName();    String sfFileName = JarUtils.META_INF + signaturesFileName                        + JarUtils.SF_SUFFIX;    log.finest("Processing " + sfFileName); //$NON-NLS-1$    JarEntry sfEntry = new JarEntry(sfFileName);    sfEntry.setTime(System.currentTimeMillis());    outSignedJarFile.putNextEntry(sfEntry);    sfHelper.writeSF(outSignedJarFile);    log.finer("Created .SF file"); //$NON-NLS-1$    if (main.isVerbose())      System.out.println(Messages.getString("JarSigner.8") + sfFileName); //$NON-NLS-1$    // 4. create the .DSA file    String dsaFileName = JarUtils.META_INF + signaturesFileName                         + JarUtils.DSA_SUFFIX;    log.finest("Processing " + dsaFileName); //$NON-NLS-1$    JarEntry dsaEntry = new JarEntry(dsaFileName);    dsaEntry.setTime(System.currentTimeMillis());    outSignedJarFile.putNextEntry(dsaEntry);    sfHelper.writeDSA(outSignedJarFile,                      main.getSignerPrivateKey(),                      main.getSignerCertificateChain(),                      main.isInternalSF());    log.finer("Created .DSA file"); //$NON-NLS-1$    if (main.isVerbose())      System.out.println(Messages.getString("JarSigner.8") + dsaFileName); //$NON-NLS-1$    // cleanup    outSignedJarFile.close();    fos.close();    signedJarFile.renameTo(new File(main.getSignedJarFileName()));    log.finer("Renamed signed JAR file"); //$NON-NLS-1$    if (main.isVerbose())      System.out.println(SystemProperties.getProperty("line.separator") //$NON-NLS-1$                         + Messages.getString("JarSigner.14")); //$NON-NLS-1$    log.exiting(this.getClass().getName(), "start"); //$NON-NLS-1$  }