##### SUMMARY
The `openssl_publickey` module should support a cryptography backend, so PyOpenSSL can be deprecated / removed eventually.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
openssl_publickey

"""Ensure the resource is in its desired state."""
        state_and_perms = super(PublicKey, self).check(module, perms_required)
        def _check_privatekey():
            if not os.path.exists(self.privatekey_path):
                return False
            try:
                with open(self.path, 'rb') as public_key_fh:
                    publickey_content = public_key_fh.read()
                if self.format == 'OpenSSH':
                    current_publickey = crypto_serialization.load_ssh_public_key(publickey_content, backend=default_backend())
                    publickey_content = current_publickey.public_bytes(crypto_serialization.Encoding.PEM,
                                                                       crypto_serialization.PublicFormat.SubjectPublicKeyInfo)
                current_publickey = crypto.dump_publickey(
                    crypto.FILETYPE_ASN1,
                    crypto.load_publickey(crypto.FILETYPE_PEM, publickey_content)
                )
            except Exception as dummy:
                return False
            try:
                desired_publickey = crypto.dump_publickey(
                    crypto.FILETYPE_ASN1,
                    crypto_utils.load_privatekey(self.privatekey_path, self.privatekey_passphrase)
                )
            except crypto_utils.OpenSSLBadPassphraseError as exc:
                raise PublicKeyError(exc)
            return current_publickey == desired_publickey
        if not state_and_perms:
            return state_and_perms
        return _check_privatekey()
    def remove(self, module):