log.finer("Alias [" + alias + "] is a trusted certificate");
if (Configuration.DEBUG) log.fine("Alias [" + alias + "] is a trusted certificate");
  void start() throws KeyStoreException, CertificateEncodingException,      IOException  {    log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$    ensureStoreContainsAlias();    Certificate certificate;    if (store.isCertificateEntry(alias))      {        log.finer("Alias [" + alias + "] is a trusted certificate"); //$NON-NLS-1$ //$NON-NLS-2$        certificate = store.getCertificate(alias);      }    else      {        log.finer("Alias [" + alias + "] is a key entry"); //$NON-NLS-1$ //$NON-NLS-2$        Certificate[] chain = store.getCertificateChain(alias);        certificate = chain[0];      }    byte[] derBytes = certificate.getEncoded();    if (rfc)      {        String encoded = Base64.encode(derBytes, 0, derBytes.length, true);        PrintWriter pw = new PrintWriter(outStream, true);        pw.println("-----BEGIN CERTIFICATE-----"); //$NON-NLS-1$        pw.println(encoded);        pw.println("-----END CERTIFICATE-----"); //$NON-NLS-1$      }    else      outStream.write(derBytes);    // stream is closed in Command.teardown()    log.exiting(this.getClass().getName(), "start"); //$NON-NLS-1$  }