class Crypto {

    public static String extractX509CertPublicKey(X509Certificate x509Cert) {

        PublicKey publicKey = x509Cert.getPublicKey();
        ///CLOVER:OFF
        if (publicKey == null) {
            LOG.error("extractX509CertPublicKey: unable to get public key");
            return null;
        }
        ///CLOVER:ON
        return convertToPEMFormat(publicKey);
    }

}