String (@NotNull X509Certificate cert) { return new StringBuilder() .append(" - Subject: ") .append(cert.getSubjectDN().getName()) .append('\n') .append(" - Valid: ") .append("from ").append(cert.getNotBefore()).append(" until ").append(cert.getNotAfter()) .append('\n') .append(" - Issuer: ") .append(cert.getIssuerDN().getName()) .append('\n') .append(" - Fingerprint: ") .append(CertificateInfoPanel.formatHex(new CertificateWrapper(cert).getSha1Fingerprint(), false)) .toString(); }