if (Configuration.DEBUG)
  void start() throws KeyStoreException, NoSuchAlgorithmException, IOException,      UnsupportedCallbackException, UnrecoverableKeyException,      InvalidKeyException, SignatureException  {    log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$    // 1. get the key entry and certificate chain associated to alias    Key privateKey = getAliasPrivateKey();    Certificate[] chain = store.getCertificateChain(alias);    // 2. get alias's DN and public key to use in the CSR    X509Certificate bottomCertificate = (X509Certificate) chain[0];    X500Principal aliasName = bottomCertificate.getIssuerX500Principal();    PublicKey publicKey = bottomCertificate.getPublicKey();    // 3. generate the CSR    setSignatureAlgorithmParam(_sigAlgorithm, privateKey);    byte[] derBytes = getCSR(aliasName, publicKey, (PrivateKey) privateKey);    // 4. encode it in base-64 and write it to outStream    String encoded = Base64.encode(derBytes, 0, derBytes.length, true);    PrintWriter writer = new PrintWriter(outStream, true);    writer.println("-----BEGIN NEW CERTIFICATE REQUEST-----"); //$NON-NLS-1$    writer.println(encoded);    writer.println("-----END NEW CERTIFICATE REQUEST-----"); //$NON-NLS-1$    if (verbose)      {        if (! systemOut)          System.out.println(Messages.getFormattedString("CertReqCmd.27", //$NON-NLS-1$                                                         _certReqFileName));        System.out.println(Messages.getString("CertReqCmd.28")); //$NON-NLS-1$      }    writer.close();    log.exiting(this.getClass().getName(), "start"); //$NON-NLS-1$  }