'Replace the certificate portion of the PKCS12 structure
:param cert: The new certificate.
:type cert: :py:class:`X509` or :py:data:`None`
:return: None'

def set_certificate(self, cert):

    if (not isinstance(cert, X509)):
        raise TypeError('cert    must    be    an    X509    instance')
    self._cert = cert
