class X509CertRequest {

    public boolean validatePublicKeys(final String publicKey) {

        if (publicKey == null) {
            LOGGER.error("comparePublicKeys: No public key provided for validation");
            return false;
        }
        
        // we are going to remove all whitespace, new lines
        // in order to compare the pem encoded keys
        
        if (!extractCsrPublicKey()) {
            LOGGER.error("comparePublicKeys: Unable to extract CSR public key");
            return false;
        }

        if (!compareCsrPublicKey(publicKey)) {
            LOGGER.error("comparePublicKeys: Public key mismatch");
            return false;
        }

        return true;
    }

    public  X509CertRequest(String csr);

}