'Get the public key of the certificate
:return: The public key'

def get_pubkey(self):

    pkey = PKey.__new__(PKey)
    pkey._pkey = _lib.X509_get_pubkey(self._x509)
    if (pkey._pkey == _ffi.NULL):
        _raise_current_error()
    pkey._pkey = _ffi.gc(pkey._pkey, _lib.EVP_PKEY_free)
    pkey._only_public = True
    return pkey
