/** * This method returns the commonName attribute for a given certificate * * @param certificateId * the certificate id * @return the commonName if available or null */ public String getCertificateCommonName(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getSubject().getCommonName(); } return null; }