private void doExportCert(String alias,PrintStream out) throws Exception {
  if (storePass == null && !KeyStoreUtil.isWindowsKeyStore(storetype)) {
    printWarning();
  }
  if (alias == null) {
    alias=keyAlias;
  }
  if (keyStore.containsAlias(alias) == false) {
    MessageFormat form=new MessageFormat(rb.getString("Alias.alias.does.not.exist"));
    Object[] source={alias};
    throw new Exception(form.format(source));
  }
  X509Certificate cert=(X509Certificate)keyStore.getCertificate(alias);
  if (cert == null) {
    MessageFormat form=new MessageFormat(rb.getString("Alias.alias.has.no.certificate"));
    Object[] source={alias};
    throw new Exception(form.format(source));
  }
  dumpCert(cert,out);
}

private void doExportCert ( String alias , PrintStream out ) throws Exception { if ( storePass == null && ! KeyStoreUtil . isWindowsKeyStore ( storetype ) ) { printWarning ( ) ; } if ( alias == null ) { alias = keyAlias ; } if ( keyStore . containsAlias ( alias ) == false ) { MessageFormat form = new MessageFormat ( rb . getString ( "Alias.alias.does.not.exist" ) ) ; Object [ ] source = { alias } ; throw new Exception ( form . format ( source ) ) ; } X509Certificate cert = ( X509Certificate ) keyStore . getCertificate ( alias ) ; if ( cert == null ) { MessageFormat form = new MessageFormat ( rb . getString ( "Alias.alias.has.no.certificate" ) ) ; Object [ ] source = { alias } ; throw new Exception ( form . format ( source ) ) ; } dumpCert ( cert , out ) ; }
exports a certificate from the keystore .
