@Override public boolean place(Trans trans, CertInfo capi, Artifact a) { if(capi.getNotes()!=null && capi.getNotes().length()>0) { trans.info().printf("Warning: %s\n",capi.getNotes()); } out.printf("Challenge: %s\n",capi.getChallenge()); out.printf("PrivateKey:\n%s\n",capi.getPrivatekey()); out.println("Certificate Chain:"); for(String c : capi.getCerts()) { out.println(c); } return true; } }
@Override public boolean place(Trans trans, CertInfo capi, Artifact a) { if(capi.getNotes()!=null && capi.getNotes().length()>0) { trans.info().printf("Warning: %s\n",capi.getNotes()); } out.printf("Challenge: %s\n",capi.getChallenge()); out.printf("PrivateKey:\n%s\n",capi.getPrivatekey()); out.println("Certificate Chain:"); for(String c : capi.getCerts()) { out.println(c); } return true; } }
@Override public boolean _place(Trans trans, CertInfo certInfo, Artifact arti) throws CadiException { try { // Setup Public Cert File f = new File(dir,arti.getAppName()+".crt"); write(f,Chmod.to644,certInfo.getCerts().get(0),C_R); // Setup Private Key f = new File(dir,arti.getAppName()+".key"); write(f,Chmod.to400,certInfo.getPrivatekey(),C_R); } catch (Exception e) { throw new CadiException(e); } return true; } }
@Override public boolean _place(Trans trans, CertInfo certInfo, Artifact arti) throws CadiException { try { // Setup Public Cert File f = new File(dir,arti.getAppName()+".crt"); write(f,Chmod.to644,certInfo.getCerts().get(0),C_R); // Setup Private Key f = new File(dir,arti.getAppName()+".key"); write(f,Chmod.to400,certInfo.getPrivatekey(),C_R); } catch (Exception e) { throw new CadiException(e); } return true; } }
PrivateKey pk = Factory.toPrivateKey(trans, certInfo.getPrivatekey()); addEncProperty(Config.CADI_KEY_PASSWORD, keyPass); addProperty(Config.CADI_ALIAS, arti.getMechid());
PrivateKey pk = Factory.toPrivateKey(trans, certInfo.getPrivatekey()); addEncProperty(Config.CADI_KEY_PASSWORD, keyPass); addProperty(Config.CADI_ALIAS, arti.getMechid());