private static Optional<String> extractDNFromCertificate(final X509Certificate cert) {
        return Optional.ofNullable(cert.getSubjectDN().getName());
    }
Given a cert pull out the DN. E.g.
"CN=some.server.co.uk, OU=servers, O=some organisation, C=GB"

@return null or the CN name
stroom-receive/stroom-receive-common/src/main/java/stroom/receive/common/CertificateExtractorImpl.java