def verify_certificate(self):
        """
        Verify a certificate in a context.

        .. versionadded:: 0.15

        :param store_ctx: The :py:class:`X509StoreContext` to verify.

        :raises X509StoreContextError: If an error occurred when validating a
          certificate in the context. Sets ``certificate`` attribute to
          indicate which certificate caused the error.
        """
        # Always re-initialize the store context in case
        # :py:meth:`verify_certificate` is called multiple times.
        self._init()
        ret = _lib.X509_verify_cert(self._store_ctx)
        self._cleanup()
        if ret <= 0:
            raise self._exception_from_context()
dataset/ETHPy150Open pyca/pyopenssl/src/OpenSSL/crypto.py/X509StoreContext.verify_certificate/original