'Set the public key of the certificate
:param pkey: The public key
:return: None'

def set_pubkey(self, pkey):

    if (not isinstance(pkey, PKey)):
        raise TypeError('pkey    must    be    a    PKey    instance')
    set_result = _lib.X509_set_pubkey(self._x509, pkey._pkey)
    if (not set_result):
        _raise_current_error()
