protected void displayStatus(KeyBindingType type) { StatusType status = type.getStatus(); getPrintStream().println(" The certificate had the following status"); getPrintStream().println(" Valid:"); displayStatusReasons(status.getValidReason()); getPrintStream().println(" Indeterminable:"); displayStatusReasons(status.getIndeterminateReason()); getPrintStream().println(" Invalid:"); displayStatusReasons(status.getInvalidReason()); }
protected List getCertsFromKeyBinding(KeyBindingType keyBinding) throws CertificateException { ArrayList retval = new ArrayList(); JAXBElement<X509DataType> jAXBX509Data = (JAXBElement<X509DataType>) keyBinding.getKeyInfo().getContent().get(0); Iterator iter2 = jAXBX509Data.getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName().iterator(); while (iter2.hasNext()) { JAXBElement next = (JAXBElement) iter2.next(); if (next.getName().getLocalPart().equals("X509Certificate")) { byte[] encoded = (byte[]) next.getValue(); Certificate nextCert = CertTools.getCertfromByteArray(encoded); retval.add(nextCert); } } return retval; }