def _exception_from_context(self):
errors = [<EOL>_lib.X509_STORE_CTX_get_error(self._store_ctx),<EOL>_lib.X509_STORE_CTX_get_error_depth(self._store_ctx),<EOL>_native(_ffi.string(_lib.X509_verify_cert_error_string(<EOL>_lib.X509_STORE_CTX_get_error(self._store_ctx)))),<EOL>]<EOL>_x509 = _lib.X509_STORE_CTX_get_current_cert(self._store_ctx)<EOL>_cert = _lib.X509_dup(_x509)<EOL>pycert = X509._from_raw_x509_ptr(_cert)<EOL>return X509StoreContextError(errors, pycert)<EOL>
Convert an OpenSSL native context error failure into a Python
exception.

When a call to native OpenSSL X509_verify_cert fails, additional
information about the failure can be obtained from the store context.