#NEWLINE# def _exception_from_context( self ) : #NEWLINE# #INDENT# '\n        Convert an OpenSSL native context error failure into a Python\n        exception.\n\n        When a call to native OpenSSL X509_verify_cert fails, additonal information\n        about the failure can be obtained from the store context.\n        ' #NEWLINE# errors = [ _lib . X509_STORE_CTX_get_error ( _x509 . _store_ctx ) , _lib . X509_STORE_CTX_get_error_depth ( self . _store_ctx ) , _native ( _ffi . string ( _lib . X509_verify_cert_error_string ( _lib . X509_STORE_CTX_get_error ( self . _store_ctx ) ) ) ) ] #NEWLINE# _x509 = _lib . X509_STORE_CTX_get_current_cert ( self . _store_ctx ) #NEWLINE# _cert = _lib . X509_dup ( _x509 ) #NEWLINE# pycert = X509 . __new__ ( X509 ) #NEWLINE# pycert . _x509 = _ffi . gc ( _cert , _lib . X509_free ) #NEWLINE# return X509StoreContextError ( errors , pycert )