@Nullable public static LocalDate getCellValueLocalDate (@Nullable final Cell aCell) { final Date aDate = getCellValueJavaDate (aCell); return aDate == null ? null : PDTFactory.createLocalDate (aDate); }
@Nonnull private static IHCNode _getCertificateDisplay (@Nullable final String sCert, @Nonnull final Locale aDisplayLocale) { X509Certificate aEndpointCert = null; try { aEndpointCert = CertificateHelper.convertStringToCertficate (sCert); } catch (final Exception ex) { // Ignore } if (aEndpointCert == null) { final int nDisplayLen = 20; final String sCertPart = (sCert.length () > nDisplayLen ? sCert.substring (0, 20) + "..." : sCert); return new HCDiv ().addChild ("Invalid certificate" + (sCert.length () > nDisplayLen ? " starting with: " : ": ")) .addChild (new HCCode ().addChild (sCertPart)); } final HCNodeList ret = new HCNodeList (); ret.addChild (new HCDiv ().addChild ("Issuer: " + aEndpointCert.getIssuerDN ().toString ())); ret.addChild (new HCDiv ().addChild ("Subject: " + aEndpointCert.getSubjectDN ().toString ())); final LocalDate aNotBefore = PDTFactory.createLocalDate (aEndpointCert.getNotBefore ()); ret.addChild (new HCDiv ().addChild ("Not before: " + PDTToString.getAsString (aNotBefore, aDisplayLocale))); final LocalDate aNotAfter = PDTFactory.createLocalDate (aEndpointCert.getNotAfter ()); ret.addChild (new HCDiv ().addChild ("Not after: " + PDTToString.getAsString (aNotAfter, aDisplayLocale))); return ret; }
@Nonnull private static IHCNode _getCertificateDisplay (@Nullable final String sCert, @Nonnull final Locale aDisplayLocale) { X509Certificate aEndpointCert = null; try { aEndpointCert = CertificateHelper.convertStringToCertficate (sCert); } catch (final Exception ex) { // Ignore } if (aEndpointCert == null) { final int nDisplayLen = 20; final String sCertPart = (sCert.length () > nDisplayLen ? sCert.substring (0, 20) + "..." : sCert); return new HCDiv ().addChild ("Invalid certificate" + (sCert.length () > nDisplayLen ? " starting with: " : ": ")) .addChild (new HCCode ().addChild (sCertPart)); } final HCNodeList ret = new HCNodeList (); ret.addChild (new HCDiv ().addChild ("Issuer: " + aEndpointCert.getIssuerDN ().toString ())); ret.addChild (new HCDiv ().addChild ("Subject: " + aEndpointCert.getSubjectDN ().toString ())); final LocalDate aNotBefore = PDTFactory.createLocalDate (aEndpointCert.getNotBefore ()); ret.addChild (new HCDiv ().addChild ("Not before: " + PDTToString.getAsString (aNotBefore, aDisplayLocale))); final LocalDate aNotAfter = PDTFactory.createLocalDate (aEndpointCert.getNotAfter ()); ret.addChild (new HCDiv ().addChild ("Not after: " + PDTToString.getAsString (aNotAfter, aDisplayLocale))); return ret; }
final LocalDate aNotBefore = PDTFactory.createLocalDate (aMigrationPublicKey.getNotBefore ()); final LocalDate aNotAfter = PDTFactory.createLocalDate (aMigrationPublicKey.getNotAfter ()); aCaller.prepareChangeCertificate (sMigrationPublicKey, aMigrationDate); final LocalDate aNotBefore = PDTFactory.createLocalDate (aMigrationPublicKey.getNotBefore ()); final LocalDate aNotAfter = PDTFactory.createLocalDate (aMigrationPublicKey.getNotAfter ());