GregorianCalendar now = new GregorianCalendar(); for(Artifact a : acf.value.getArtifact()) { if(id.equals(a.getMechid())) { File dir = new File(a.getDir()); Properties props = new Properties(); !(f=new File(prop)).exists()) { trans.error().printf("Keyfile must exist to check Certificates for %s on %s", a.getMechid(), a.getMachine()); } else { String ksf = props.getProperty(Config.CADI_KEYSTORE); if(ksf==null || ksps == null) { trans.error().printf("Properties %s and %s must exist to check Certificates for %s on %s", Config.CADI_KEYSTORE, Config.CADI_KEYSTORE_PASSWORD,a.getMechid(), a.getMachine()); } else { KeyStore ks = KeyStore.getInstance("JKS"); a.getMechid(), a.getMachine(), ksf); trans.error().log(msg); exitCode = 2; if(renew.after(now)) { msg = String.format("X509Certificate for %s on %s has been checked on %s. It expires on %s; it will not be renewed until %s.\n", a.getMechid(), a.getMachine(),Chrono.dateOnlyStamp(now),cert.getNotAfter(),Chrono.dateOnlyStamp(renew)); trans.info().log(msg); exitCode = 0; // OK } else { trans.info().printf("X509Certificate for %s on %s expiration, %s, needs Renewal.\n",
GregorianCalendar now = new GregorianCalendar(); for(Artifact a : acf.value.getArtifact()) { if(id.equals(a.getMechid())) { File dir = new File(a.getDir()); Properties props = new Properties(); !(f=new File(prop)).exists()) { trans.error().printf("Keyfile must exist to check Certificates for %s on %s", a.getMechid(), a.getMachine()); } else { String ksf = props.getProperty(Config.CADI_KEYSTORE); if(ksf==null || ksps == null) { trans.error().printf("Properties %s and %s must exist to check Certificates for %s on %s", Config.CADI_KEYSTORE, Config.CADI_KEYSTORE_PASSWORD,a.getMechid(), a.getMachine()); } else { KeyStore ks = KeyStore.getInstance("JKS"); a.getMechid(), a.getMachine(), ksf); trans.error().log(msg); exitCode = 2; if(renew.after(now)) { msg = String.format("X509Certificate for %s on %s has been checked on %s. It expires on %s; it will not be renewed until %s.\n", a.getMechid(), a.getMachine(),Chrono.dateOnlyStamp(now),cert.getNotAfter(),Chrono.dateOnlyStamp(renew)); trans.info().log(msg); exitCode = 0; // OK } else { trans.info().printf("X509Certificate for %s on %s expiration, %s, needs Renewal.\n",
if(a.getOsUser().equals(osID)) { CertificateRequest cr = new CertificateRequest(); cr.setMechid(a.getMechid()); cr.setSponsor(a.getSponsor()); cr.getFqdns().add(a.getMachine());
if(a.getOsUser().equals(osID)) { CertificateRequest cr = new CertificateRequest(); cr.setMechid(a.getMechid()); cr.setSponsor(a.getSponsor()); cr.getFqdns().add(a.getMachine());
boolean printed = false; for(Artifact a : future.value.getArtifact()) { AAFSSO.cons.printf("MechID: %s\n",a.getMechid()); AAFSSO.cons.printf(" Sponsor: %s\n",a.getSponsor()); AAFSSO.cons.printf("Machine: %s\n",a.getMachine());
String configRootName = AAFCon.reverseDomain(arti.getMechid()); arti.setAppName(AAFSSO.cons.readLine("Namespace (%s): ",configRootName)); arti.setDir(AAFSSO.cons.readLine("Directory (%s): ", System.getProperty("user.dir"))); Future<Artifacts> future = aafcon.client(CM_VER).create("/cert/artifacts", artifactsDF, artifacts); if(future.get(TIMEOUT)) { trans.info().printf("Call to AAF Certman successful %s, %s",arti.getMechid(), arti.getMachine()); } else { trans.error().printf("Call to AAF Certman failed, %s",
boolean printed = false; for(Artifact a : future.value.getArtifact()) { AAFSSO.cons.printf("MechID: %s\n",a.getMechid()); AAFSSO.cons.printf(" Sponsor: %s\n",a.getSponsor()); AAFSSO.cons.printf("Machine: %s\n",a.getMachine());
String configRootName = AAFCon.reverseDomain(arti.getMechid()); arti.setAppName(AAFSSO.cons.readLine("Namespace (%s): ",configRootName)); arti.setDir(AAFSSO.cons.readLine("Directory (%s): ", System.getProperty("user.dir"))); Future<Artifacts> future = aafcon.client(CM_VER).create("/cert/artifacts", artifactsDF, artifacts); if(future.get(TIMEOUT)) { trans.info().printf("Call to AAF Certman successful %s, %s",arti.getMechid(), arti.getMachine()); } else { trans.error().printf("Call to AAF Certman failed, %s",