diff --git a/ssh2/error_codes.c b/ssh2/error_codes.c index 1e16be10..1b34280f 100644 --- a/ssh2/error_codes.c +++ b/ssh2/error_codes.c @@ -1935,15 +1935,12 @@ static const char __pyx_k_LIBSSH2_ERROR_ENCRYPT[] = "LIBSSH2_ERROR_ENCRYPT"; static const char __pyx_k_LIBSSH2_ERROR_RANDGEN[] = "LIBSSH2_ERROR_RANDGEN"; static const char __pyx_k_LIBSSH2_ERROR_TIMEOUT[] = "LIBSSH2_ERROR_TIMEOUT"; static const char __pyx_k_LIBSSH2_ERROR_COMPRESS[] = "LIBSSH2_ERROR_COMPRESS"; -static const char __pyx_k_LIBSSH2_ERROR_HASH_CALC[] = "LIBSSH2_ERROR_HASH_CALC"; -static const char __pyx_k_LIBSSH2_ERROR_HASH_INIT[] = "LIBSSH2_ERROR_HASH_INIT"; static const char __pyx_k_LIBSSH2_ERROR_BAD_SOCKET[] = "LIBSSH2_ERROR_BAD_SOCKET"; static const char __pyx_k_LIBSSH2_ERROR_BANNER_RECV[] = "LIBSSH2_ERROR_BANNER_RECV"; static const char __pyx_k_LIBSSH2_ERROR_BANNER_SEND[] = "LIBSSH2_ERROR_BANNER_SEND"; static const char __pyx_k_LIBSSH2_ERROR_INVALID_MAC[] = "LIBSSH2_ERROR_INVALID_MAC"; static const char __pyx_k_LIBSSH2_ERROR_KEX_FAILURE[] = "LIBSSH2_ERROR_KEX_FAILURE"; static const char __pyx_k_LIBSSH2_ERROR_KNOWN_HOSTS[] = "LIBSSH2_ERROR_KNOWN_HOSTS"; -static const char __pyx_k_LIBSSH2_ERROR_MAC_FAILURE[] = "LIBSSH2_ERROR_MAC_FAILURE"; static const char __pyx_k_LIBSSH2_ERROR_METHOD_NONE[] = "LIBSSH2_ERROR_METHOD_NONE"; static const char __pyx_k_LIBSSH2_ERROR_SOCKET_NONE[] = "LIBSSH2_ERROR_SOCKET_NONE"; static const char __pyx_k_LIBSSH2_ERROR_SOCKET_RECV[] = "LIBSSH2_ERROR_SOCKET_RECV"; @@ -2017,7 +2014,7 @@ typedef struct { #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif - PyObject *__pyx_string_tab[64]; + PyObject *__pyx_string_tab[61]; /* #### Code section: module_state_contents ### */ /* CodeObjectCache.module_state_decls */ struct __Pyx_CodeObjectCache __pyx_code_cache; @@ -2072,45 +2069,42 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_LIBSSH2_ERROR_EAGAIN __pyx_string_tab[22] #define __pyx_n_u_LIBSSH2_ERROR_ENCRYPT __pyx_string_tab[23] #define __pyx_n_u_LIBSSH2_ERROR_FILE __pyx_string_tab[24] -#define __pyx_n_u_LIBSSH2_ERROR_HASH_CALC __pyx_string_tab[25] -#define __pyx_n_u_LIBSSH2_ERROR_HASH_INIT __pyx_string_tab[26] -#define __pyx_n_u_LIBSSH2_ERROR_HOSTKEY_INIT __pyx_string_tab[27] -#define __pyx_n_u_LIBSSH2_ERROR_HOSTKEY_SIGN __pyx_string_tab[28] -#define __pyx_n_u_LIBSSH2_ERROR_INVAL __pyx_string_tab[29] -#define __pyx_n_u_LIBSSH2_ERROR_INVALID_MAC __pyx_string_tab[30] -#define __pyx_n_u_LIBSSH2_ERROR_INVALID_POLL_TYPE __pyx_string_tab[31] -#define __pyx_n_u_LIBSSH2_ERROR_KEX_FAILURE __pyx_string_tab[32] -#define __pyx_n_u_LIBSSH2_ERROR_KEYFILE_AUTH_FAILE __pyx_string_tab[33] -#define __pyx_n_u_LIBSSH2_ERROR_KEY_EXCHANGE_FAILU __pyx_string_tab[34] -#define __pyx_n_u_LIBSSH2_ERROR_KNOWN_HOSTS __pyx_string_tab[35] -#define __pyx_n_u_LIBSSH2_ERROR_MAC_FAILURE __pyx_string_tab[36] -#define __pyx_n_u_LIBSSH2_ERROR_METHOD_NONE __pyx_string_tab[37] -#define __pyx_n_u_LIBSSH2_ERROR_METHOD_NOT_SUPPORT __pyx_string_tab[38] -#define __pyx_n_u_LIBSSH2_ERROR_MISSING_USERAUTH_B __pyx_string_tab[39] -#define __pyx_n_u_LIBSSH2_ERROR_NONE __pyx_string_tab[40] -#define __pyx_n_u_LIBSSH2_ERROR_OUT_OF_BOUNDARY __pyx_string_tab[41] -#define __pyx_n_u_LIBSSH2_ERROR_PASSWORD_EXPIRED __pyx_string_tab[42] -#define __pyx_n_u_LIBSSH2_ERROR_PROTO __pyx_string_tab[43] -#define __pyx_n_u_LIBSSH2_ERROR_PUBLICKEY_PROTOCOL __pyx_string_tab[44] -#define __pyx_n_u_LIBSSH2_ERROR_PUBLICKEY_UNRECOGN __pyx_string_tab[45] -#define __pyx_n_u_LIBSSH2_ERROR_PUBLICKEY_UNVERIFI __pyx_string_tab[46] -#define __pyx_n_u_LIBSSH2_ERROR_RANDGEN __pyx_string_tab[47] -#define __pyx_n_u_LIBSSH2_ERROR_REQUEST_DENIED __pyx_string_tab[48] -#define __pyx_n_u_LIBSSH2_ERROR_SCP_PROTOCOL __pyx_string_tab[49] -#define __pyx_n_u_LIBSSH2_ERROR_SFTP_PROTOCOL __pyx_string_tab[50] -#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_DISCONNECT __pyx_string_tab[51] -#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_NONE __pyx_string_tab[52] -#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_RECV __pyx_string_tab[53] -#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_SEND __pyx_string_tab[54] -#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_TIMEOUT __pyx_string_tab[55] -#define __pyx_n_u_LIBSSH2_ERROR_TIMEOUT __pyx_string_tab[56] -#define __pyx_n_u_LIBSSH2_ERROR_ZLIB __pyx_string_tab[57] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[58] -#define __pyx_n_u_main __pyx_string_tab[59] -#define __pyx_n_u_module __pyx_string_tab[60] -#define __pyx_n_u_name __pyx_string_tab[61] -#define __pyx_n_u_qualname __pyx_string_tab[62] -#define __pyx_n_u_test __pyx_string_tab[63] +#define __pyx_n_u_LIBSSH2_ERROR_HOSTKEY_INIT __pyx_string_tab[25] +#define __pyx_n_u_LIBSSH2_ERROR_HOSTKEY_SIGN __pyx_string_tab[26] +#define __pyx_n_u_LIBSSH2_ERROR_INVAL __pyx_string_tab[27] +#define __pyx_n_u_LIBSSH2_ERROR_INVALID_MAC __pyx_string_tab[28] +#define __pyx_n_u_LIBSSH2_ERROR_INVALID_POLL_TYPE __pyx_string_tab[29] +#define __pyx_n_u_LIBSSH2_ERROR_KEX_FAILURE __pyx_string_tab[30] +#define __pyx_n_u_LIBSSH2_ERROR_KEYFILE_AUTH_FAILE __pyx_string_tab[31] +#define __pyx_n_u_LIBSSH2_ERROR_KEY_EXCHANGE_FAILU __pyx_string_tab[32] +#define __pyx_n_u_LIBSSH2_ERROR_KNOWN_HOSTS __pyx_string_tab[33] +#define __pyx_n_u_LIBSSH2_ERROR_METHOD_NONE __pyx_string_tab[34] +#define __pyx_n_u_LIBSSH2_ERROR_METHOD_NOT_SUPPORT __pyx_string_tab[35] +#define __pyx_n_u_LIBSSH2_ERROR_MISSING_USERAUTH_B __pyx_string_tab[36] +#define __pyx_n_u_LIBSSH2_ERROR_NONE __pyx_string_tab[37] +#define __pyx_n_u_LIBSSH2_ERROR_OUT_OF_BOUNDARY __pyx_string_tab[38] +#define __pyx_n_u_LIBSSH2_ERROR_PASSWORD_EXPIRED __pyx_string_tab[39] +#define __pyx_n_u_LIBSSH2_ERROR_PROTO __pyx_string_tab[40] +#define __pyx_n_u_LIBSSH2_ERROR_PUBLICKEY_PROTOCOL __pyx_string_tab[41] +#define __pyx_n_u_LIBSSH2_ERROR_PUBLICKEY_UNRECOGN __pyx_string_tab[42] +#define __pyx_n_u_LIBSSH2_ERROR_PUBLICKEY_UNVERIFI __pyx_string_tab[43] +#define __pyx_n_u_LIBSSH2_ERROR_RANDGEN __pyx_string_tab[44] +#define __pyx_n_u_LIBSSH2_ERROR_REQUEST_DENIED __pyx_string_tab[45] +#define __pyx_n_u_LIBSSH2_ERROR_SCP_PROTOCOL __pyx_string_tab[46] +#define __pyx_n_u_LIBSSH2_ERROR_SFTP_PROTOCOL __pyx_string_tab[47] +#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_DISCONNECT __pyx_string_tab[48] +#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_NONE __pyx_string_tab[49] +#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_RECV __pyx_string_tab[50] +#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_SEND __pyx_string_tab[51] +#define __pyx_n_u_LIBSSH2_ERROR_SOCKET_TIMEOUT __pyx_string_tab[52] +#define __pyx_n_u_LIBSSH2_ERROR_TIMEOUT __pyx_string_tab[53] +#define __pyx_n_u_LIBSSH2_ERROR_ZLIB __pyx_string_tab[54] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[55] +#define __pyx_n_u_main __pyx_string_tab[56] +#define __pyx_n_u_module __pyx_string_tab[57] +#define __pyx_n_u_name __pyx_string_tab[58] +#define __pyx_n_u_qualname __pyx_string_tab[59] +#define __pyx_n_u_test __pyx_string_tab[60] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -2131,7 +2125,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { #if CYTHON_PEP489_MULTI_PHASE_INIT __Pyx_State_RemoveModule(NULL); #endif - for (int i=0; i<64; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<61; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } return 0; } #endif @@ -2152,7 +2146,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif - for (int i=0; i<64; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<61; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } return 0; } #endif @@ -3151,7 +3145,6 @@ __Pyx_RefNannySetupContext("PyInit_error_codes", 0); * LIBSSH2_ERROR_RANDGEN = error_codes._LIBSSH2_ERROR_RANDGEN * LIBSSH2_ERROR_MISSING_USERAUTH_BANNER = error_codes._LIBSSH2_ERROR_MISSING_USERAUTH_BANNER # <<<<<<<<<<<<<< * LIBSSH2_ERROR_ALGO_UNSUPPORTED = error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED - * LIBSSH2_ERROR_MAC_FAILURE = error_codes._LIBSSH2_ERROR_MAC_FAILURE */ __pyx_t_2 = __Pyx_PyLong_From___pyx_anon_enum(LIBSSH2_ERROR_MISSING_USERAUTH_BANNER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -3162,47 +3155,12 @@ __Pyx_RefNannySetupContext("PyInit_error_codes", 0); * LIBSSH2_ERROR_RANDGEN = error_codes._LIBSSH2_ERROR_RANDGEN * LIBSSH2_ERROR_MISSING_USERAUTH_BANNER = error_codes._LIBSSH2_ERROR_MISSING_USERAUTH_BANNER * LIBSSH2_ERROR_ALGO_UNSUPPORTED = error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED # <<<<<<<<<<<<<< - * LIBSSH2_ERROR_MAC_FAILURE = error_codes._LIBSSH2_ERROR_MAC_FAILURE - * LIBSSH2_ERROR_HASH_INIT = error_codes._LIBSSH2_ERROR_HASH_INIT */ __pyx_t_2 = __Pyx_PyLong_From___pyx_anon_enum(LIBSSH2_ERROR_ALGO_UNSUPPORTED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LIBSSH2_ERROR_ALGO_UNSUPPORTED, __pyx_t_2) < 0) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh2/error_codes.pyx":87 - * LIBSSH2_ERROR_MISSING_USERAUTH_BANNER = error_codes._LIBSSH2_ERROR_MISSING_USERAUTH_BANNER - * LIBSSH2_ERROR_ALGO_UNSUPPORTED = error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED - * LIBSSH2_ERROR_MAC_FAILURE = error_codes._LIBSSH2_ERROR_MAC_FAILURE # <<<<<<<<<<<<<< - * LIBSSH2_ERROR_HASH_INIT = error_codes._LIBSSH2_ERROR_HASH_INIT - * LIBSSH2_ERROR_HASH_CALC = error_codes._LIBSSH2_ERROR_HASH_CALC -*/ - __pyx_t_2 = __Pyx_PyLong_From___pyx_anon_enum(LIBSSH2_ERROR_MAC_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LIBSSH2_ERROR_MAC_FAILURE, __pyx_t_2) < 0) __PYX_ERR(0, 87, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "ssh2/error_codes.pyx":88 - * LIBSSH2_ERROR_ALGO_UNSUPPORTED = error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED - * LIBSSH2_ERROR_MAC_FAILURE = error_codes._LIBSSH2_ERROR_MAC_FAILURE - * LIBSSH2_ERROR_HASH_INIT = error_codes._LIBSSH2_ERROR_HASH_INIT # <<<<<<<<<<<<<< - * LIBSSH2_ERROR_HASH_CALC = error_codes._LIBSSH2_ERROR_HASH_CALC -*/ - __pyx_t_2 = __Pyx_PyLong_From___pyx_anon_enum(LIBSSH2_ERROR_HASH_INIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LIBSSH2_ERROR_HASH_INIT, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "ssh2/error_codes.pyx":89 - * LIBSSH2_ERROR_MAC_FAILURE = error_codes._LIBSSH2_ERROR_MAC_FAILURE - * LIBSSH2_ERROR_HASH_INIT = error_codes._LIBSSH2_ERROR_HASH_INIT - * LIBSSH2_ERROR_HASH_CALC = error_codes._LIBSSH2_ERROR_HASH_CALC # <<<<<<<<<<<<<< -*/ - __pyx_t_2 = __Pyx_PyLong_From___pyx_anon_enum(LIBSSH2_ERROR_HASH_CALC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LIBSSH2_ERROR_HASH_CALC, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "ssh2/error_codes.pyx":1 * # This file is part of ssh2-python. # <<<<<<<<<<<<<< * # Copyright (C) 2017-2020 Panos Kittenis @@ -3296,8 +3254,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_LIBSSH2_ERROR_EAGAIN, sizeof(__pyx_k_LIBSSH2_ERROR_EAGAIN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_EAGAIN */ {__pyx_k_LIBSSH2_ERROR_ENCRYPT, sizeof(__pyx_k_LIBSSH2_ERROR_ENCRYPT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_ENCRYPT */ {__pyx_k_LIBSSH2_ERROR_FILE, sizeof(__pyx_k_LIBSSH2_ERROR_FILE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_FILE */ - {__pyx_k_LIBSSH2_ERROR_HASH_CALC, sizeof(__pyx_k_LIBSSH2_ERROR_HASH_CALC), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_HASH_CALC */ - {__pyx_k_LIBSSH2_ERROR_HASH_INIT, sizeof(__pyx_k_LIBSSH2_ERROR_HASH_INIT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_HASH_INIT */ {__pyx_k_LIBSSH2_ERROR_HOSTKEY_INIT, sizeof(__pyx_k_LIBSSH2_ERROR_HOSTKEY_INIT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_HOSTKEY_INIT */ {__pyx_k_LIBSSH2_ERROR_HOSTKEY_SIGN, sizeof(__pyx_k_LIBSSH2_ERROR_HOSTKEY_SIGN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_HOSTKEY_SIGN */ {__pyx_k_LIBSSH2_ERROR_INVAL, sizeof(__pyx_k_LIBSSH2_ERROR_INVAL), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_INVAL */ @@ -3307,7 +3263,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_LIBSSH2_ERROR_KEYFILE_AUTH_FAILE, sizeof(__pyx_k_LIBSSH2_ERROR_KEYFILE_AUTH_FAILE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_KEYFILE_AUTH_FAILE */ {__pyx_k_LIBSSH2_ERROR_KEY_EXCHANGE_FAILU, sizeof(__pyx_k_LIBSSH2_ERROR_KEY_EXCHANGE_FAILU), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_KEY_EXCHANGE_FAILU */ {__pyx_k_LIBSSH2_ERROR_KNOWN_HOSTS, sizeof(__pyx_k_LIBSSH2_ERROR_KNOWN_HOSTS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_KNOWN_HOSTS */ - {__pyx_k_LIBSSH2_ERROR_MAC_FAILURE, sizeof(__pyx_k_LIBSSH2_ERROR_MAC_FAILURE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_MAC_FAILURE */ {__pyx_k_LIBSSH2_ERROR_METHOD_NONE, sizeof(__pyx_k_LIBSSH2_ERROR_METHOD_NONE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_METHOD_NONE */ {__pyx_k_LIBSSH2_ERROR_METHOD_NOT_SUPPORT, sizeof(__pyx_k_LIBSSH2_ERROR_METHOD_NOT_SUPPORT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_METHOD_NOT_SUPPORT */ {__pyx_k_LIBSSH2_ERROR_MISSING_USERAUTH_B, sizeof(__pyx_k_LIBSSH2_ERROR_MISSING_USERAUTH_B), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBSSH2_ERROR_MISSING_USERAUTH_B */ diff --git a/ssh2/error_codes.pxd b/ssh2/error_codes.pxd index 2622416d..7fdfcef1 100644 --- a/ssh2/error_codes.pxd +++ b/ssh2/error_codes.pxd @@ -80,8 +80,5 @@ cdef extern from "libssh2.h" nogil: _LIBSSH2_ERROR_RANDGEN "LIBSSH2_ERROR_RANDGEN" _LIBSSH2_ERROR_MISSING_USERAUTH_BANNER "LIBSSH2_ERROR_MISSING_USERAUTH_BANNER" _LIBSSH2_ERROR_ALGO_UNSUPPORTED "LIBSSH2_ERROR_ALGO_UNSUPPORTED" - _LIBSSH2_ERROR_MAC_FAILURE "LIBSSH2_ERROR_MAC_FAILURE" - _LIBSSH2_ERROR_HASH_INIT "LIBSSH2_ERROR_HASH_INIT" - _LIBSSH2_ERROR_HASH_CALC "LIBSSH2_ERROR_HASH_CALC" _LIBSSH2CHANNEL_EAGAIN "LIBSSH2_ERROR_EAGAIN" diff --git a/ssh2/error_codes.pyx b/ssh2/error_codes.pyx index 139059c4..abf97ae0 100644 --- a/ssh2/error_codes.pyx +++ b/ssh2/error_codes.pyx @@ -84,6 +84,3 @@ LIBSSH2_ERROR_KEYFILE_AUTH_FAILED = \ LIBSSH2_ERROR_RANDGEN = error_codes._LIBSSH2_ERROR_RANDGEN LIBSSH2_ERROR_MISSING_USERAUTH_BANNER = error_codes._LIBSSH2_ERROR_MISSING_USERAUTH_BANNER LIBSSH2_ERROR_ALGO_UNSUPPORTED = error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED -LIBSSH2_ERROR_MAC_FAILURE = error_codes._LIBSSH2_ERROR_MAC_FAILURE -LIBSSH2_ERROR_HASH_INIT = error_codes._LIBSSH2_ERROR_HASH_INIT -LIBSSH2_ERROR_HASH_CALC = error_codes._LIBSSH2_ERROR_HASH_CALC diff --git a/ssh2/exceptions.c b/ssh2/exceptions.c index 2c8590d4..0fa212be 100644 --- a/ssh2/exceptions.c +++ b/ssh2/exceptions.c @@ -1971,8 +1971,6 @@ static const char __pyx_k_RandGenError[] = "RandGenError"; static const char __pyx_k_SessionError[] = "SessionError"; static const char __pyx_k_UnknownError[] = "UnknownError"; static const char __pyx_k_CompressError[] = "CompressError"; -static const char __pyx_k_HashCalcError[] = "HashCalcError"; -static const char __pyx_k_HashInitError[] = "HashInitError"; static const char __pyx_k_ProtocolError[] = "ProtocolError"; static const char __pyx_k_SocketTimeout[] = "SocketTimeout"; static const char __pyx_k_BadSocketError[] = "BadSocketError"; @@ -1983,7 +1981,6 @@ static const char __pyx_k_BannerRecvError[] = "BannerRecvError"; static const char __pyx_k_BannerSendError[] = "BannerSendError"; static const char __pyx_k_InvalidMACError[] = "InvalidMACError"; static const char __pyx_k_KexFailureError[] = "KexFailureError"; -static const char __pyx_k_MacFailureError[] = "MacFailureError"; static const char __pyx_k_MethodNoneError[] = "MethodNoneError"; static const char __pyx_k_SFTPHandleError[] = "SFTPHandleError"; static const char __pyx_k_SocketRecvError[] = "SocketRecvError"; @@ -2047,7 +2044,6 @@ static const char __pyx_k_Raised_on_allocation_error[] = "Raised on allocation e static const char __pyx_k_Raised_on_channel_failures[] = "Raised on channel failures"; static const char __pyx_k_KnownHostCheckMisMatchError[] = "KnownHostCheckMisMatchError"; static const char __pyx_k_KnownHostCheckNotFoundError[] = "KnownHostCheckNotFoundError"; -static const char __pyx_k_Raised_on_MAC_failure_error[] = "Raised on MAC failure error"; static const char __pyx_k_Raised_on_decryption_errors[] = "Raised on decryption errors"; static const char __pyx_k_Raised_on_encryption_errors[] = "Raised on encryption errors"; static const char __pyx_k_Raised_on_API_bad_use_errors[] = "Raised on API bad use errors"; @@ -2097,8 +2093,6 @@ static const char __pyx_k_Raised_on_errors_retrieving_know[] = "Raised on errors static const char __pyx_k_Raised_on_errors_signing_host_ke[] = "Raised on errors signing host key"; static const char __pyx_k_Raised_on_errors_writing_line_to[] = "Raised on errors writing line to known hosts file"; static const char __pyx_k_Raised_on_errors_writing_to_know[] = "Raised on errors writing to known hosts file"; -static const char __pyx_k_Raised_on_hash_calculation_error[] = "Raised on hash calculation error"; -static const char __pyx_k_Raised_on_hash_initialisation_er[] = "Raised on hash initialisation error"; static const char __pyx_k_Raised_on_invalid_poll_type_erro[] = "Raised on invalid poll type errors"; static const char __pyx_k_Raised_on_invalid_request_errors[] = "Raised on invalid request errors"; static const char __pyx_k_Raised_on_key_file_authenticatio[] = "Raised on key file authentication error"; @@ -2109,7 +2103,7 @@ static const char __pyx_k_Raised_on_out_of_boundary_errors[] = "Raised on out of static const char __pyx_k_Raised_on_password_expired_error[] = "Raised on password expired errors"; static const char __pyx_k_Raised_on_public_key_protocol_er[] = "Raised on public key protocol errors"; static const char __pyx_k_Raised_on_public_key_verificatio[] = "Raised on public key verification errors"; -static const char __pyx_k_Raised_on_randon_number_generato[] = "Raised on randon number generator errors"; +static const char __pyx_k_Raised_on_randon_number_generato[] = "Raised on randon number generator error"; static const char __pyx_k_Raised_on_session_handshake_erro[] = "Raised on session handshake errors"; static const char __pyx_k_Raised_on_session_startup_errors[] = "Raised on session startup errors"; static const char __pyx_k_Raised_on_socket_disconnection_e[] = "Raised on socket disconnection errors"; @@ -2155,7 +2149,7 @@ typedef struct { #ifdef __Pyx_Coroutine_USED PyTypeObject *__pyx_CoroutineType; #endif - PyObject *__pyx_string_tab[170]; + PyObject *__pyx_string_tab[164]; /* #### Code section: module_state_contents ### */ /* CodeObjectCache.module_state_decls */ struct __Pyx_CodeObjectCache __pyx_code_cache; @@ -2222,139 +2216,133 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_DecryptError __pyx_string_tab[34] #define __pyx_n_u_EncryptError __pyx_string_tab[35] #define __pyx_n_u_FileError __pyx_string_tab[36] -#define __pyx_n_u_HashCalcError __pyx_string_tab[37] -#define __pyx_n_u_HashInitError __pyx_string_tab[38] -#define __pyx_n_u_HostkeyInitError __pyx_string_tab[39] -#define __pyx_n_u_HostkeySignError __pyx_string_tab[40] -#define __pyx_n_u_InvalidMACError __pyx_string_tab[41] -#define __pyx_n_u_InvalidPollTypeError __pyx_string_tab[42] -#define __pyx_n_u_InvalidRequestError __pyx_string_tab[43] -#define __pyx_n_u_KexFailureError __pyx_string_tab[44] -#define __pyx_n_u_KeyExchangeError __pyx_string_tab[45] -#define __pyx_n_u_KeyfileAuthFailedError __pyx_string_tab[46] -#define __pyx_n_u_KnownHostAddError __pyx_string_tab[47] -#define __pyx_n_u_KnownHostCheckError __pyx_string_tab[48] -#define __pyx_n_u_KnownHostCheckFailure __pyx_string_tab[49] -#define __pyx_n_u_KnownHostCheckMisMatchError __pyx_string_tab[50] -#define __pyx_n_u_KnownHostCheckNotFoundError __pyx_string_tab[51] -#define __pyx_n_u_KnownHostDeleteError __pyx_string_tab[52] -#define __pyx_n_u_KnownHostError __pyx_string_tab[53] -#define __pyx_n_u_KnownHostGetError __pyx_string_tab[54] -#define __pyx_n_u_KnownHostReadFileError __pyx_string_tab[55] -#define __pyx_n_u_KnownHostReadLineError __pyx_string_tab[56] -#define __pyx_n_u_KnownHostWriteFileError __pyx_string_tab[57] -#define __pyx_n_u_KnownHostWriteLineError __pyx_string_tab[58] -#define __pyx_n_u_MacFailureError __pyx_string_tab[59] -#define __pyx_n_u_MethodNoneError __pyx_string_tab[60] -#define __pyx_n_u_MethodNotSupported __pyx_string_tab[61] -#define __pyx_n_u_MissingUserAuthBannerError __pyx_string_tab[62] -#define __pyx_n_u_OutOfBoundaryError __pyx_string_tab[63] -#define __pyx_n_u_PasswordExpiredError __pyx_string_tab[64] -#define __pyx_n_u_ProtocolError __pyx_string_tab[65] -#define __pyx_n_u_PublicKeyError __pyx_string_tab[66] -#define __pyx_n_u_PublicKeyInitError __pyx_string_tab[67] -#define __pyx_n_u_PublicKeyProtocolError __pyx_string_tab[68] -#define __pyx_n_u_PublickeyUnverifiedError __pyx_string_tab[69] -#define __pyx_kp_u_Raised_on_API_bad_use_errors __pyx_string_tab[70] -#define __pyx_kp_u_Raised_on_KEX_failure __pyx_string_tab[71] -#define __pyx_kp_u_Raised_on_MAC_failure_error __pyx_string_tab[72] -#define __pyx_kp_u_Raised_on_SCP_protocol_errors __pyx_string_tab[73] -#define __pyx_kp_u_Raised_on_SFTP_handle_errors __pyx_string_tab[74] -#define __pyx_kp_u_Raised_on_SFTP_protocol_errors __pyx_string_tab[75] -#define __pyx_kp_u_Raised_on_SSH_Agent_authenticati __pyx_string_tab[76] -#define __pyx_kp_u_Raised_on_SSH_Agent_connection_e __pyx_string_tab[77] -#define __pyx_kp_u_Raised_on_SSH_Agent_get_identity __pyx_string_tab[78] -#define __pyx_kp_u_Raised_on_SSH_Agent_list_identit __pyx_string_tab[79] -#define __pyx_kp_u_Raised_on_SSH_agent_protocol_err __pyx_string_tab[80] -#define __pyx_kp_u_Raised_on_allocation_error __pyx_string_tab[81] -#define __pyx_kp_u_Raised_on_any_known_host_check_e __pyx_string_tab[82] -#define __pyx_kp_u_Raised_on_authentication_method __pyx_string_tab[83] -#define __pyx_kp_u_Raised_on_buffer_too_small_error __pyx_string_tab[84] -#define __pyx_kp_u_Raised_on_channel_EOF_errors __pyx_string_tab[85] -#define __pyx_kp_u_Raised_on_channel_closed_errors __pyx_string_tab[86] -#define __pyx_kp_u_Raised_on_channel_commands_out_o __pyx_string_tab[87] -#define __pyx_kp_u_Raised_on_channel_failures __pyx_string_tab[88] -#define __pyx_kp_u_Raised_on_channel_max_packet_len __pyx_string_tab[89] -#define __pyx_kp_u_Raised_on_channel_request_denied __pyx_string_tab[90] -#define __pyx_kp_u_Raised_on_channel_window_exceede __pyx_string_tab[91] -#define __pyx_kp_u_Raised_on_channel_window_full_er __pyx_string_tab[92] -#define __pyx_kp_u_Raised_on_compression_errors __pyx_string_tab[93] -#define __pyx_kp_u_Raised_on_decryption_errors __pyx_string_tab[94] -#define __pyx_kp_u_Raised_on_encryption_errors __pyx_string_tab[95] -#define __pyx_kp_u_Raised_on_errors_adding_known_ho __pyx_string_tab[96] -#define __pyx_kp_u_Raised_on_errors_deleting_known __pyx_string_tab[97] -#define __pyx_kp_u_Raised_on_errors_exchanging_keys __pyx_string_tab[98] -#define __pyx_kp_u_Raised_on_errors_getting_server __pyx_string_tab[99] -#define __pyx_kp_u_Raised_on_errors_initialiasing_h __pyx_string_tab[100] -#define __pyx_kp_u_Raised_on_errors_initialising_pu __pyx_string_tab[101] -#define __pyx_kp_u_Raised_on_errors_reading_from_kn __pyx_string_tab[102] -#define __pyx_kp_u_Raised_on_errors_reading_line_fr __pyx_string_tab[103] -#define __pyx_kp_u_Raised_on_errors_receiving_banne __pyx_string_tab[104] -#define __pyx_kp_u_Raised_on_errors_retrieving_know __pyx_string_tab[105] -#define __pyx_kp_u_Raised_on_errors_sending_banner __pyx_string_tab[106] -#define __pyx_kp_u_Raised_on_errors_signing_host_ke __pyx_string_tab[107] -#define __pyx_kp_u_Raised_on_errors_writing_line_to __pyx_string_tab[108] -#define __pyx_kp_u_Raised_on_errors_writing_to_know __pyx_string_tab[109] -#define __pyx_kp_u_Raised_on_file_errors __pyx_string_tab[110] -#define __pyx_kp_u_Raised_on_hash_calculation_error __pyx_string_tab[111] -#define __pyx_kp_u_Raised_on_hash_initialisation_er __pyx_string_tab[112] -#define __pyx_kp_u_Raised_on_invalid_MAC __pyx_string_tab[113] -#define __pyx_kp_u_Raised_on_invalid_method_errors __pyx_string_tab[114] -#define __pyx_kp_u_Raised_on_invalid_poll_type_erro __pyx_string_tab[115] -#define __pyx_kp_u_Raised_on_invalid_request_errors __pyx_string_tab[116] -#define __pyx_kp_u_Raised_on_key_file_authenticatio __pyx_string_tab[117] -#define __pyx_kp_u_Raised_on_keys_do_not_match_for __pyx_string_tab[118] -#define __pyx_kp_u_Raised_on_missing_user_authentic __pyx_string_tab[119] -#define __pyx_kp_u_Raised_on_no_match_for_known_hos __pyx_string_tab[120] -#define __pyx_kp_u_Raised_on_non_specific_or_unknow __pyx_string_tab[121] -#define __pyx_kp_u_Raised_on_out_of_boundary_errors __pyx_string_tab[122] -#define __pyx_kp_u_Raised_on_password_expired_error __pyx_string_tab[123] -#define __pyx_kp_u_Raised_on_protocol_errors __pyx_string_tab[124] -#define __pyx_kp_u_Raised_on_public_key_protocol_er __pyx_string_tab[125] -#define __pyx_kp_u_Raised_on_public_key_verificatio __pyx_string_tab[126] -#define __pyx_kp_u_Raised_on_randon_number_generato __pyx_string_tab[127] -#define __pyx_kp_u_Raised_on_request_denied_errors __pyx_string_tab[128] -#define __pyx_kp_u_Raised_on_session_handshake_erro __pyx_string_tab[129] -#define __pyx_kp_u_Raised_on_session_startup_errors __pyx_string_tab[130] -#define __pyx_kp_u_Raised_on_socket_disconnection_e __pyx_string_tab[131] -#define __pyx_kp_u_Raised_on_socket_receive_errors __pyx_string_tab[132] -#define __pyx_kp_u_Raised_on_socket_send_errors __pyx_string_tab[133] -#define __pyx_kp_u_Raised_on_socket_timeouts __pyx_string_tab[134] -#define __pyx_kp_u_Raised_on_something_preventing_k __pyx_string_tab[135] -#define __pyx_kp_u_Raised_on_timeouts __pyx_string_tab[136] -#define __pyx_kp_u_Raised_on_unknown_channel_errors __pyx_string_tab[137] -#define __pyx_kp_u_Raised_on_unsupported_algorithm __pyx_string_tab[138] -#define __pyx_kp_u_Raised_on_use_of_bad_socket_erro __pyx_string_tab[139] -#define __pyx_kp_u_Raised_on_zlib_errors __pyx_string_tab[140] -#define __pyx_n_u_RandGenError __pyx_string_tab[141] -#define __pyx_n_u_RequestDeniedError __pyx_string_tab[142] -#define __pyx_n_u_SCPProtocolError __pyx_string_tab[143] -#define __pyx_n_u_SFTPError __pyx_string_tab[144] -#define __pyx_n_u_SFTPHandleError __pyx_string_tab[145] -#define __pyx_n_u_SFTPProtocolError __pyx_string_tab[146] -#define __pyx_n_u_SSH2Error __pyx_string_tab[147] -#define __pyx_n_u_SessionError __pyx_string_tab[148] -#define __pyx_n_u_SessionHandshakeError __pyx_string_tab[149] -#define __pyx_n_u_SessionHostKeyError __pyx_string_tab[150] -#define __pyx_n_u_SessionStartupError __pyx_string_tab[151] -#define __pyx_n_u_SocketDisconnectError __pyx_string_tab[152] -#define __pyx_n_u_SocketRecvError __pyx_string_tab[153] -#define __pyx_n_u_SocketSendError __pyx_string_tab[154] -#define __pyx_n_u_SocketTimeout __pyx_string_tab[155] -#define __pyx_n_u_Timeout __pyx_string_tab[156] -#define __pyx_n_u_UnknownError __pyx_string_tab[157] -#define __pyx_n_u_ZlibError __pyx_string_tab[158] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[159] -#define __pyx_n_u_doc __pyx_string_tab[160] -#define __pyx_n_u_main __pyx_string_tab[161] -#define __pyx_n_u_metaclass __pyx_string_tab[162] -#define __pyx_n_u_module __pyx_string_tab[163] -#define __pyx_n_u_mro_entries __pyx_string_tab[164] -#define __pyx_n_u_name __pyx_string_tab[165] -#define __pyx_n_u_prepare __pyx_string_tab[166] -#define __pyx_n_u_qualname __pyx_string_tab[167] -#define __pyx_n_u_ssh2_exceptions __pyx_string_tab[168] -#define __pyx_n_u_test __pyx_string_tab[169] +#define __pyx_n_u_HostkeyInitError __pyx_string_tab[37] +#define __pyx_n_u_HostkeySignError __pyx_string_tab[38] +#define __pyx_n_u_InvalidMACError __pyx_string_tab[39] +#define __pyx_n_u_InvalidPollTypeError __pyx_string_tab[40] +#define __pyx_n_u_InvalidRequestError __pyx_string_tab[41] +#define __pyx_n_u_KexFailureError __pyx_string_tab[42] +#define __pyx_n_u_KeyExchangeError __pyx_string_tab[43] +#define __pyx_n_u_KeyfileAuthFailedError __pyx_string_tab[44] +#define __pyx_n_u_KnownHostAddError __pyx_string_tab[45] +#define __pyx_n_u_KnownHostCheckError __pyx_string_tab[46] +#define __pyx_n_u_KnownHostCheckFailure __pyx_string_tab[47] +#define __pyx_n_u_KnownHostCheckMisMatchError __pyx_string_tab[48] +#define __pyx_n_u_KnownHostCheckNotFoundError __pyx_string_tab[49] +#define __pyx_n_u_KnownHostDeleteError __pyx_string_tab[50] +#define __pyx_n_u_KnownHostError __pyx_string_tab[51] +#define __pyx_n_u_KnownHostGetError __pyx_string_tab[52] +#define __pyx_n_u_KnownHostReadFileError __pyx_string_tab[53] +#define __pyx_n_u_KnownHostReadLineError __pyx_string_tab[54] +#define __pyx_n_u_KnownHostWriteFileError __pyx_string_tab[55] +#define __pyx_n_u_KnownHostWriteLineError __pyx_string_tab[56] +#define __pyx_n_u_MethodNoneError __pyx_string_tab[57] +#define __pyx_n_u_MethodNotSupported __pyx_string_tab[58] +#define __pyx_n_u_MissingUserAuthBannerError __pyx_string_tab[59] +#define __pyx_n_u_OutOfBoundaryError __pyx_string_tab[60] +#define __pyx_n_u_PasswordExpiredError __pyx_string_tab[61] +#define __pyx_n_u_ProtocolError __pyx_string_tab[62] +#define __pyx_n_u_PublicKeyError __pyx_string_tab[63] +#define __pyx_n_u_PublicKeyInitError __pyx_string_tab[64] +#define __pyx_n_u_PublicKeyProtocolError __pyx_string_tab[65] +#define __pyx_n_u_PublickeyUnverifiedError __pyx_string_tab[66] +#define __pyx_kp_u_Raised_on_API_bad_use_errors __pyx_string_tab[67] +#define __pyx_kp_u_Raised_on_KEX_failure __pyx_string_tab[68] +#define __pyx_kp_u_Raised_on_SCP_protocol_errors __pyx_string_tab[69] +#define __pyx_kp_u_Raised_on_SFTP_handle_errors __pyx_string_tab[70] +#define __pyx_kp_u_Raised_on_SFTP_protocol_errors __pyx_string_tab[71] +#define __pyx_kp_u_Raised_on_SSH_Agent_authenticati __pyx_string_tab[72] +#define __pyx_kp_u_Raised_on_SSH_Agent_connection_e __pyx_string_tab[73] +#define __pyx_kp_u_Raised_on_SSH_Agent_get_identity __pyx_string_tab[74] +#define __pyx_kp_u_Raised_on_SSH_Agent_list_identit __pyx_string_tab[75] +#define __pyx_kp_u_Raised_on_SSH_agent_protocol_err __pyx_string_tab[76] +#define __pyx_kp_u_Raised_on_allocation_error __pyx_string_tab[77] +#define __pyx_kp_u_Raised_on_any_known_host_check_e __pyx_string_tab[78] +#define __pyx_kp_u_Raised_on_authentication_method __pyx_string_tab[79] +#define __pyx_kp_u_Raised_on_buffer_too_small_error __pyx_string_tab[80] +#define __pyx_kp_u_Raised_on_channel_EOF_errors __pyx_string_tab[81] +#define __pyx_kp_u_Raised_on_channel_closed_errors __pyx_string_tab[82] +#define __pyx_kp_u_Raised_on_channel_commands_out_o __pyx_string_tab[83] +#define __pyx_kp_u_Raised_on_channel_failures __pyx_string_tab[84] +#define __pyx_kp_u_Raised_on_channel_max_packet_len __pyx_string_tab[85] +#define __pyx_kp_u_Raised_on_channel_request_denied __pyx_string_tab[86] +#define __pyx_kp_u_Raised_on_channel_window_exceede __pyx_string_tab[87] +#define __pyx_kp_u_Raised_on_channel_window_full_er __pyx_string_tab[88] +#define __pyx_kp_u_Raised_on_compression_errors __pyx_string_tab[89] +#define __pyx_kp_u_Raised_on_decryption_errors __pyx_string_tab[90] +#define __pyx_kp_u_Raised_on_encryption_errors __pyx_string_tab[91] +#define __pyx_kp_u_Raised_on_errors_adding_known_ho __pyx_string_tab[92] +#define __pyx_kp_u_Raised_on_errors_deleting_known __pyx_string_tab[93] +#define __pyx_kp_u_Raised_on_errors_exchanging_keys __pyx_string_tab[94] +#define __pyx_kp_u_Raised_on_errors_getting_server __pyx_string_tab[95] +#define __pyx_kp_u_Raised_on_errors_initialiasing_h __pyx_string_tab[96] +#define __pyx_kp_u_Raised_on_errors_initialising_pu __pyx_string_tab[97] +#define __pyx_kp_u_Raised_on_errors_reading_from_kn __pyx_string_tab[98] +#define __pyx_kp_u_Raised_on_errors_reading_line_fr __pyx_string_tab[99] +#define __pyx_kp_u_Raised_on_errors_receiving_banne __pyx_string_tab[100] +#define __pyx_kp_u_Raised_on_errors_retrieving_know __pyx_string_tab[101] +#define __pyx_kp_u_Raised_on_errors_sending_banner __pyx_string_tab[102] +#define __pyx_kp_u_Raised_on_errors_signing_host_ke __pyx_string_tab[103] +#define __pyx_kp_u_Raised_on_errors_writing_line_to __pyx_string_tab[104] +#define __pyx_kp_u_Raised_on_errors_writing_to_know __pyx_string_tab[105] +#define __pyx_kp_u_Raised_on_file_errors __pyx_string_tab[106] +#define __pyx_kp_u_Raised_on_invalid_MAC __pyx_string_tab[107] +#define __pyx_kp_u_Raised_on_invalid_method_errors __pyx_string_tab[108] +#define __pyx_kp_u_Raised_on_invalid_poll_type_erro __pyx_string_tab[109] +#define __pyx_kp_u_Raised_on_invalid_request_errors __pyx_string_tab[110] +#define __pyx_kp_u_Raised_on_key_file_authenticatio __pyx_string_tab[111] +#define __pyx_kp_u_Raised_on_keys_do_not_match_for __pyx_string_tab[112] +#define __pyx_kp_u_Raised_on_missing_user_authentic __pyx_string_tab[113] +#define __pyx_kp_u_Raised_on_no_match_for_known_hos __pyx_string_tab[114] +#define __pyx_kp_u_Raised_on_non_specific_or_unknow __pyx_string_tab[115] +#define __pyx_kp_u_Raised_on_out_of_boundary_errors __pyx_string_tab[116] +#define __pyx_kp_u_Raised_on_password_expired_error __pyx_string_tab[117] +#define __pyx_kp_u_Raised_on_protocol_errors __pyx_string_tab[118] +#define __pyx_kp_u_Raised_on_public_key_protocol_er __pyx_string_tab[119] +#define __pyx_kp_u_Raised_on_public_key_verificatio __pyx_string_tab[120] +#define __pyx_kp_u_Raised_on_randon_number_generato __pyx_string_tab[121] +#define __pyx_kp_u_Raised_on_request_denied_errors __pyx_string_tab[122] +#define __pyx_kp_u_Raised_on_session_handshake_erro __pyx_string_tab[123] +#define __pyx_kp_u_Raised_on_session_startup_errors __pyx_string_tab[124] +#define __pyx_kp_u_Raised_on_socket_disconnection_e __pyx_string_tab[125] +#define __pyx_kp_u_Raised_on_socket_receive_errors __pyx_string_tab[126] +#define __pyx_kp_u_Raised_on_socket_send_errors __pyx_string_tab[127] +#define __pyx_kp_u_Raised_on_socket_timeouts __pyx_string_tab[128] +#define __pyx_kp_u_Raised_on_something_preventing_k __pyx_string_tab[129] +#define __pyx_kp_u_Raised_on_timeouts __pyx_string_tab[130] +#define __pyx_kp_u_Raised_on_unknown_channel_errors __pyx_string_tab[131] +#define __pyx_kp_u_Raised_on_unsupported_algorithm __pyx_string_tab[132] +#define __pyx_kp_u_Raised_on_use_of_bad_socket_erro __pyx_string_tab[133] +#define __pyx_kp_u_Raised_on_zlib_errors __pyx_string_tab[134] +#define __pyx_n_u_RandGenError __pyx_string_tab[135] +#define __pyx_n_u_RequestDeniedError __pyx_string_tab[136] +#define __pyx_n_u_SCPProtocolError __pyx_string_tab[137] +#define __pyx_n_u_SFTPError __pyx_string_tab[138] +#define __pyx_n_u_SFTPHandleError __pyx_string_tab[139] +#define __pyx_n_u_SFTPProtocolError __pyx_string_tab[140] +#define __pyx_n_u_SSH2Error __pyx_string_tab[141] +#define __pyx_n_u_SessionError __pyx_string_tab[142] +#define __pyx_n_u_SessionHandshakeError __pyx_string_tab[143] +#define __pyx_n_u_SessionHostKeyError __pyx_string_tab[144] +#define __pyx_n_u_SessionStartupError __pyx_string_tab[145] +#define __pyx_n_u_SocketDisconnectError __pyx_string_tab[146] +#define __pyx_n_u_SocketRecvError __pyx_string_tab[147] +#define __pyx_n_u_SocketSendError __pyx_string_tab[148] +#define __pyx_n_u_SocketTimeout __pyx_string_tab[149] +#define __pyx_n_u_Timeout __pyx_string_tab[150] +#define __pyx_n_u_UnknownError __pyx_string_tab[151] +#define __pyx_n_u_ZlibError __pyx_string_tab[152] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[153] +#define __pyx_n_u_doc __pyx_string_tab[154] +#define __pyx_n_u_main __pyx_string_tab[155] +#define __pyx_n_u_metaclass __pyx_string_tab[156] +#define __pyx_n_u_module __pyx_string_tab[157] +#define __pyx_n_u_mro_entries __pyx_string_tab[158] +#define __pyx_n_u_name __pyx_string_tab[159] +#define __pyx_n_u_prepare __pyx_string_tab[160] +#define __pyx_n_u_qualname __pyx_string_tab[161] +#define __pyx_n_u_ssh2_exceptions __pyx_string_tab[162] +#define __pyx_n_u_test __pyx_string_tab[163] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -2375,7 +2363,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { #if CYTHON_PEP489_MULTI_PHASE_INIT __Pyx_State_RemoveModule(NULL); #endif - for (int i=0; i<170; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<164; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } return 0; } #endif @@ -2396,7 +2384,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void #ifdef __Pyx_FusedFunction_USED Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); #endif - for (int i=0; i<170; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<164; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } return 0; } #endif @@ -4930,7 +4918,7 @@ __Pyx_RefNannySetupContext("PyInit_exceptions", 0); * * * class RandGenError(SSH2Error): # <<<<<<<<<<<<<< - * """Raised on randon number generator errors""" + * """Raised on randon number generator error""" * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SSH2Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) @@ -5019,9 +5007,8 @@ __Pyx_RefNannySetupContext("PyInit_exceptions", 0); /* "ssh2/exceptions.pyx":318 * * - * class MacFailureError(SSH2Error): # <<<<<<<<<<<<<< - * """Raised on MAC failure error""" - * + * class UnknownError(SSH2Error): # <<<<<<<<<<<<<< + * """Raised on non-specific or unknown errors""" */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SSH2Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -5032,104 +5019,15 @@ __Pyx_RefNannySetupContext("PyInit_exceptions", 0); __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_MacFailureError, __pyx_mstate_global->__pyx_n_u_MacFailureError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_ssh2_exceptions, __pyx_mstate_global->__pyx_kp_u_Raised_on_MAC_failure_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_UnknownError, __pyx_mstate_global->__pyx_n_u_UnknownError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_ssh2_exceptions, __pyx_mstate_global->__pyx_kp_u_Raised_on_non_specific_or_unknow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3 != __pyx_t_2) { if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 318, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MacFailureError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MacFailureError, __pyx_t_2) < 0) __PYX_ERR(0, 318, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/exceptions.pyx":322 - * - * - * class HashInitError(SSH2Error): # <<<<<<<<<<<<<< - * """Raised on hash initialisation error""" - * -*/ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SSH2Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_HashInitError, __pyx_mstate_global->__pyx_n_u_HashInitError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_ssh2_exceptions, __pyx_mstate_global->__pyx_kp_u_Raised_on_hash_initialisation_er); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__pyx_t_3 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 322, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_HashInitError, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_HashInitError, __pyx_t_4) < 0) __PYX_ERR(0, 322, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/exceptions.pyx":326 - * - * - * class HashCalcError(SSH2Error): # <<<<<<<<<<<<<< - * """Raised on hash calculation error""" - * -*/ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SSH2Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_HashCalcError, __pyx_mstate_global->__pyx_n_u_HashCalcError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_ssh2_exceptions, __pyx_mstate_global->__pyx_kp_u_Raised_on_hash_calculation_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_3 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 326, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HashCalcError, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_HashCalcError, __pyx_t_5) < 0) __PYX_ERR(0, 326, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/exceptions.pyx":330 - * - * - * class UnknownError(SSH2Error): # <<<<<<<<<<<<<< - * """Raised on non-specific or unknown errors""" -*/ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SSH2Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 330, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_UnknownError, __pyx_mstate_global->__pyx_n_u_UnknownError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_ssh2_exceptions, __pyx_mstate_global->__pyx_kp_u_Raised_on_non_specific_or_unknow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 330, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__pyx_t_3 != __pyx_t_2) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 330, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnknownError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnknownError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UnknownError, __pyx_t_2) < 0) __PYX_ERR(0, 330, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UnknownError, __pyx_t_2) < 0) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -5243,8 +5141,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_DecryptError, sizeof(__pyx_k_DecryptError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DecryptError */ {__pyx_k_EncryptError, sizeof(__pyx_k_EncryptError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EncryptError */ {__pyx_k_FileError, sizeof(__pyx_k_FileError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FileError */ - {__pyx_k_HashCalcError, sizeof(__pyx_k_HashCalcError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HashCalcError */ - {__pyx_k_HashInitError, sizeof(__pyx_k_HashInitError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HashInitError */ {__pyx_k_HostkeyInitError, sizeof(__pyx_k_HostkeyInitError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HostkeyInitError */ {__pyx_k_HostkeySignError, sizeof(__pyx_k_HostkeySignError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HostkeySignError */ {__pyx_k_InvalidMACError, sizeof(__pyx_k_InvalidMACError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_InvalidMACError */ @@ -5265,7 +5161,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_KnownHostReadLineError, sizeof(__pyx_k_KnownHostReadLineError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_KnownHostReadLineError */ {__pyx_k_KnownHostWriteFileError, sizeof(__pyx_k_KnownHostWriteFileError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_KnownHostWriteFileError */ {__pyx_k_KnownHostWriteLineError, sizeof(__pyx_k_KnownHostWriteLineError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_KnownHostWriteLineError */ - {__pyx_k_MacFailureError, sizeof(__pyx_k_MacFailureError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MacFailureError */ {__pyx_k_MethodNoneError, sizeof(__pyx_k_MethodNoneError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MethodNoneError */ {__pyx_k_MethodNotSupported, sizeof(__pyx_k_MethodNotSupported), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MethodNotSupported */ {__pyx_k_MissingUserAuthBannerError, sizeof(__pyx_k_MissingUserAuthBannerError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MissingUserAuthBannerError */ @@ -5278,7 +5173,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_PublickeyUnverifiedError, sizeof(__pyx_k_PublickeyUnverifiedError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PublickeyUnverifiedError */ {__pyx_k_Raised_on_API_bad_use_errors, sizeof(__pyx_k_Raised_on_API_bad_use_errors), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_API_bad_use_errors */ {__pyx_k_Raised_on_KEX_failure, sizeof(__pyx_k_Raised_on_KEX_failure), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_KEX_failure */ - {__pyx_k_Raised_on_MAC_failure_error, sizeof(__pyx_k_Raised_on_MAC_failure_error), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_MAC_failure_error */ {__pyx_k_Raised_on_SCP_protocol_errors, sizeof(__pyx_k_Raised_on_SCP_protocol_errors), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_SCP_protocol_errors */ {__pyx_k_Raised_on_SFTP_handle_errors, sizeof(__pyx_k_Raised_on_SFTP_handle_errors), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_SFTP_handle_errors */ {__pyx_k_Raised_on_SFTP_protocol_errors, sizeof(__pyx_k_Raised_on_SFTP_protocol_errors), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_SFTP_protocol_errors */ @@ -5317,8 +5211,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_Raised_on_errors_writing_line_to, sizeof(__pyx_k_Raised_on_errors_writing_line_to), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_errors_writing_line_to */ {__pyx_k_Raised_on_errors_writing_to_know, sizeof(__pyx_k_Raised_on_errors_writing_to_know), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_errors_writing_to_know */ {__pyx_k_Raised_on_file_errors, sizeof(__pyx_k_Raised_on_file_errors), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_file_errors */ - {__pyx_k_Raised_on_hash_calculation_error, sizeof(__pyx_k_Raised_on_hash_calculation_error), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_hash_calculation_error */ - {__pyx_k_Raised_on_hash_initialisation_er, sizeof(__pyx_k_Raised_on_hash_initialisation_er), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_hash_initialisation_er */ {__pyx_k_Raised_on_invalid_MAC, sizeof(__pyx_k_Raised_on_invalid_MAC), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_invalid_MAC */ {__pyx_k_Raised_on_invalid_method_errors, sizeof(__pyx_k_Raised_on_invalid_method_errors), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_invalid_method_errors */ {__pyx_k_Raised_on_invalid_poll_type_erro, sizeof(__pyx_k_Raised_on_invalid_poll_type_erro), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Raised_on_invalid_poll_type_erro */ diff --git a/ssh2/exceptions.pyx b/ssh2/exceptions.pyx index 40516592..646ae779 100644 --- a/ssh2/exceptions.pyx +++ b/ssh2/exceptions.pyx @@ -315,17 +315,5 @@ class AlgoUnsupportedError(SSH2Error): """Raised on unsupported algorithm error""" -class MacFailureError(SSH2Error): - """Raised on MAC failure error""" - - -class HashInitError(SSH2Error): - """Raised on hash initialisation error""" - - -class HashCalcError(SSH2Error): - """Raised on hash calculation error""" - - class UnknownError(SSH2Error): """Raised on non-specific or unknown errors""" diff --git a/ssh2/utils.c b/ssh2/utils.c index 7f3bb590..9093fbb6 100644 --- a/ssh2/utils.c +++ b/ssh2/utils.c @@ -2366,8 +2366,6 @@ static const char __pyx_k_RandGenError[] = "RandGenError"; static const char __pyx_k_UnknownError[] = "UnknownError"; static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_CompressError[] = "CompressError"; -static const char __pyx_k_HashCalcError[] = "HashCalcError"; -static const char __pyx_k_HashInitError[] = "HashInitError"; static const char __pyx_k_ProtocolError[] = "ProtocolError"; static const char __pyx_k_SocketTimeout[] = "SocketTimeout"; static const char __pyx_k_BadSocketError[] = "BadSocketError"; @@ -2378,7 +2376,6 @@ static const char __pyx_k_BannerRecvError[] = "BannerRecvError"; static const char __pyx_k_BannerSendError[] = "BannerSendError"; static const char __pyx_k_InvalidMACError[] = "InvalidMACError"; static const char __pyx_k_KexFailureError[] = "KexFailureError"; -static const char __pyx_k_MacFailureError[] = "MacFailureError"; static const char __pyx_k_MethodNoneError[] = "MethodNoneError"; static const char __pyx_k_SocketRecvError[] = "SocketRecvError"; static const char __pyx_k_SocketSendError[] = "SocketSendError"; @@ -2418,7 +2415,7 @@ static const char __pyx_k_PublicKeyProtocolError[] = "PublicKeyProtocolError"; static const char __pyx_k_PublickeyUnverifiedError[] = "PublickeyUnverifiedError"; static const char __pyx_k_MissingUserAuthBannerError[] = "MissingUserAuthBannerError"; static const char __pyx_k_31_2_Q_q_aq_x_DA_q_x_EQ_6_T[] = "\320\0003\2601\360\014\000\005\033\230'\320!2\260!\330\004\007\200{\220#\220Q\330\010\017\210q\330\004\016\210a\210q\330\014\027\220x\320\037D\300A\330\004\017\210q\220\001\330\014\027\220x\320\037E\300Q\330\004\013\2106\220\021\220)\230:\240T\250\021"; -static const char __pyx_k_2_xs_q_q_q_q_j_q_j_q_j_q_j_q_j[] = "\320\0002\260!\360\026\000\005\010\200x\210s\220!\330\010\017\210q\330\t\021\220\036\230q\330\010\017\210q\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036""\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\360\006\000\t\014\2108\2202\220Q\330\014\022\220*\230M\250\021\320*E\300Q\330\010\017\210q"; +static const char __pyx_k_2_xs_q_q_q_q_j_q_j_q_j_q_j_q_j[] = "\320\0002\260!\360\026\000\005\010\200x\210s\220!\330\010\017\210q\330\t\021\220\036\230q\330\010\017\210q\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036""\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\330\t\021\220\036\230q\330\010\016\210j\230\001\360\006\000\t\014\2108\2202\220Q\330\014\022\220*\230M\250\021\320*E\300Q\330\010\017\210q"; static const char __pyx_k_Note_that_Cython_is_deliberately[] = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False."; /* #### Code section: decls ### */ static PyObject *__pyx_pf_4ssh2_5utils_find_eol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buf, Py_ssize_t __pyx_v_pos); /* proto */ @@ -2470,7 +2467,7 @@ typedef struct { __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; PyObject *__pyx_tuple[1]; PyObject *__pyx_codeobj_tab[5]; - PyObject *__pyx_string_tab[100]; + PyObject *__pyx_string_tab[97]; PyObject *__pyx_int_0; PyObject *__pyx_int_1; PyObject *__pyx_int_neg_1; @@ -2536,81 +2533,78 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_EncryptError __pyx_string_tab[22] #define __pyx_kp_u_Error_code_s_not_known __pyx_string_tab[23] #define __pyx_n_u_FileError __pyx_string_tab[24] -#define __pyx_n_u_HashCalcError __pyx_string_tab[25] -#define __pyx_n_u_HashInitError __pyx_string_tab[26] -#define __pyx_n_u_HostkeyInitError __pyx_string_tab[27] -#define __pyx_n_u_HostkeySignError __pyx_string_tab[28] -#define __pyx_n_u_InvalidMACError __pyx_string_tab[29] -#define __pyx_n_u_InvalidPollTypeError __pyx_string_tab[30] -#define __pyx_n_u_InvalidRequestError __pyx_string_tab[31] -#define __pyx_n_u_KexFailureError __pyx_string_tab[32] -#define __pyx_n_u_KeyExchangeError __pyx_string_tab[33] -#define __pyx_n_u_KeyfileAuthFailedError __pyx_string_tab[34] -#define __pyx_n_u_KnownHostError __pyx_string_tab[35] -#define __pyx_n_u_MacFailureError __pyx_string_tab[36] -#define __pyx_n_u_MethodNoneError __pyx_string_tab[37] -#define __pyx_n_u_MethodNotSupported __pyx_string_tab[38] -#define __pyx_n_u_MissingUserAuthBannerError __pyx_string_tab[39] -#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[40] -#define __pyx_n_u_OutOfBoundaryError __pyx_string_tab[41] -#define __pyx_n_u_PasswordExpiredError __pyx_string_tab[42] -#define __pyx_n_u_ProtocolError __pyx_string_tab[43] -#define __pyx_n_u_PublicKeyProtocolError __pyx_string_tab[44] -#define __pyx_n_u_PublickeyUnverifiedError __pyx_string_tab[45] -#define __pyx_n_u_RandGenError __pyx_string_tab[46] -#define __pyx_n_u_RequestDeniedError __pyx_string_tab[47] -#define __pyx_n_u_SCPProtocolError __pyx_string_tab[48] -#define __pyx_n_u_SFTPProtocolError __pyx_string_tab[49] -#define __pyx_n_u_SSH2Error __pyx_string_tab[50] -#define __pyx_n_u_SocketDisconnectError __pyx_string_tab[51] -#define __pyx_n_u_SocketRecvError __pyx_string_tab[52] -#define __pyx_n_u_SocketSendError __pyx_string_tab[53] -#define __pyx_n_u_SocketTimeout __pyx_string_tab[54] -#define __pyx_n_u_Timeout __pyx_string_tab[55] -#define __pyx_n_u_UnknownError __pyx_string_tab[56] -#define __pyx_n_u_ZlibError __pyx_string_tab[57] -#define __pyx_n_u__2 __pyx_string_tab[58] -#define __pyx_kp_u__3 __pyx_string_tab[59] -#define __pyx_kp_u_add_note __pyx_string_tab[60] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[61] -#define __pyx_n_u_block_directions __pyx_string_tab[62] -#define __pyx_n_u_buf __pyx_string_tab[63] -#define __pyx_n_u_buf_len __pyx_string_tab[64] -#define __pyx_n_u_c_buf __pyx_string_tab[65] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[66] -#define __pyx_n_u_cur_buf __pyx_string_tab[67] -#define __pyx_n_u_decode __pyx_string_tab[68] -#define __pyx_n_u_directions __pyx_string_tab[69] -#define __pyx_n_u_encode __pyx_string_tab[70] -#define __pyx_n_u_errcode __pyx_string_tab[71] -#define __pyx_n_u_exceptions __pyx_string_tab[72] -#define __pyx_n_u_find_eol __pyx_string_tab[73] -#define __pyx_n_u_func __pyx_string_tab[74] -#define __pyx_n_u_handle_error_codes __pyx_string_tab[75] -#define __pyx_n_u_index __pyx_string_tab[76] -#define __pyx_n_u_is_coroutine __pyx_string_tab[77] -#define __pyx_n_u_main __pyx_string_tab[78] -#define __pyx_n_u_module __pyx_string_tab[79] -#define __pyx_n_u_name __pyx_string_tab[80] -#define __pyx_n_u_new_pos __pyx_string_tab[81] -#define __pyx_n_u_pop __pyx_string_tab[82] -#define __pyx_n_u_pos __pyx_string_tab[83] -#define __pyx_n_u_qualname __pyx_string_tab[84] -#define __pyx_n_u_readfds __pyx_string_tab[85] -#define __pyx_n_u_required_version __pyx_string_tab[86] -#define __pyx_n_u_select __pyx_string_tab[87] -#define __pyx_n_u_session __pyx_string_tab[88] -#define __pyx_n_u_set_name __pyx_string_tab[89] -#define __pyx_n_u_socket __pyx_string_tab[90] -#define __pyx_n_u_ssh2_exit __pyx_string_tab[91] -#define __pyx_n_u_ssh2_utils __pyx_string_tab[92] -#define __pyx_kp_u_ssh2_utils_pyx __pyx_string_tab[93] -#define __pyx_n_u_test __pyx_string_tab[94] -#define __pyx_n_u_timeout __pyx_string_tab[95] -#define __pyx_kp_u_utf_8 __pyx_string_tab[96] -#define __pyx_n_u_version __pyx_string_tab[97] -#define __pyx_n_u_wait_socket __pyx_string_tab[98] -#define __pyx_n_u_writefds __pyx_string_tab[99] +#define __pyx_n_u_HostkeyInitError __pyx_string_tab[25] +#define __pyx_n_u_HostkeySignError __pyx_string_tab[26] +#define __pyx_n_u_InvalidMACError __pyx_string_tab[27] +#define __pyx_n_u_InvalidPollTypeError __pyx_string_tab[28] +#define __pyx_n_u_InvalidRequestError __pyx_string_tab[29] +#define __pyx_n_u_KexFailureError __pyx_string_tab[30] +#define __pyx_n_u_KeyExchangeError __pyx_string_tab[31] +#define __pyx_n_u_KeyfileAuthFailedError __pyx_string_tab[32] +#define __pyx_n_u_KnownHostError __pyx_string_tab[33] +#define __pyx_n_u_MethodNoneError __pyx_string_tab[34] +#define __pyx_n_u_MethodNotSupported __pyx_string_tab[35] +#define __pyx_n_u_MissingUserAuthBannerError __pyx_string_tab[36] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[37] +#define __pyx_n_u_OutOfBoundaryError __pyx_string_tab[38] +#define __pyx_n_u_PasswordExpiredError __pyx_string_tab[39] +#define __pyx_n_u_ProtocolError __pyx_string_tab[40] +#define __pyx_n_u_PublicKeyProtocolError __pyx_string_tab[41] +#define __pyx_n_u_PublickeyUnverifiedError __pyx_string_tab[42] +#define __pyx_n_u_RandGenError __pyx_string_tab[43] +#define __pyx_n_u_RequestDeniedError __pyx_string_tab[44] +#define __pyx_n_u_SCPProtocolError __pyx_string_tab[45] +#define __pyx_n_u_SFTPProtocolError __pyx_string_tab[46] +#define __pyx_n_u_SSH2Error __pyx_string_tab[47] +#define __pyx_n_u_SocketDisconnectError __pyx_string_tab[48] +#define __pyx_n_u_SocketRecvError __pyx_string_tab[49] +#define __pyx_n_u_SocketSendError __pyx_string_tab[50] +#define __pyx_n_u_SocketTimeout __pyx_string_tab[51] +#define __pyx_n_u_Timeout __pyx_string_tab[52] +#define __pyx_n_u_UnknownError __pyx_string_tab[53] +#define __pyx_n_u_ZlibError __pyx_string_tab[54] +#define __pyx_n_u__2 __pyx_string_tab[55] +#define __pyx_kp_u__3 __pyx_string_tab[56] +#define __pyx_kp_u_add_note __pyx_string_tab[57] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[58] +#define __pyx_n_u_block_directions __pyx_string_tab[59] +#define __pyx_n_u_buf __pyx_string_tab[60] +#define __pyx_n_u_buf_len __pyx_string_tab[61] +#define __pyx_n_u_c_buf __pyx_string_tab[62] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[63] +#define __pyx_n_u_cur_buf __pyx_string_tab[64] +#define __pyx_n_u_decode __pyx_string_tab[65] +#define __pyx_n_u_directions __pyx_string_tab[66] +#define __pyx_n_u_encode __pyx_string_tab[67] +#define __pyx_n_u_errcode __pyx_string_tab[68] +#define __pyx_n_u_exceptions __pyx_string_tab[69] +#define __pyx_n_u_find_eol __pyx_string_tab[70] +#define __pyx_n_u_func __pyx_string_tab[71] +#define __pyx_n_u_handle_error_codes __pyx_string_tab[72] +#define __pyx_n_u_index __pyx_string_tab[73] +#define __pyx_n_u_is_coroutine __pyx_string_tab[74] +#define __pyx_n_u_main __pyx_string_tab[75] +#define __pyx_n_u_module __pyx_string_tab[76] +#define __pyx_n_u_name __pyx_string_tab[77] +#define __pyx_n_u_new_pos __pyx_string_tab[78] +#define __pyx_n_u_pop __pyx_string_tab[79] +#define __pyx_n_u_pos __pyx_string_tab[80] +#define __pyx_n_u_qualname __pyx_string_tab[81] +#define __pyx_n_u_readfds __pyx_string_tab[82] +#define __pyx_n_u_required_version __pyx_string_tab[83] +#define __pyx_n_u_select __pyx_string_tab[84] +#define __pyx_n_u_session __pyx_string_tab[85] +#define __pyx_n_u_set_name __pyx_string_tab[86] +#define __pyx_n_u_socket __pyx_string_tab[87] +#define __pyx_n_u_ssh2_exit __pyx_string_tab[88] +#define __pyx_n_u_ssh2_utils __pyx_string_tab[89] +#define __pyx_kp_u_ssh2_utils_pyx __pyx_string_tab[90] +#define __pyx_n_u_test __pyx_string_tab[91] +#define __pyx_n_u_timeout __pyx_string_tab[92] +#define __pyx_kp_u_utf_8 __pyx_string_tab[93] +#define __pyx_n_u_version __pyx_string_tab[94] +#define __pyx_n_u_wait_socket __pyx_string_tab[95] +#define __pyx_n_u_writefds __pyx_string_tab[96] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -2636,7 +2630,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_ptype_4ssh2_7session_FlagType); for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<5; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<100; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<97; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_neg_1); @@ -2665,7 +2659,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void Py_VISIT(traverse_module_state->__pyx_ptype_4ssh2_7session_FlagType); for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<5; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<100; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<97; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1); __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_1); @@ -5296,8 +5290,8 @@ static int __pyx_f_4ssh2_5utils_handle_error_codes(int __pyx_v_errcode, CYTHON_U * raise exceptions.MissingUserAuthBannerError * elif errcode == error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED: * raise exceptions.AlgoUnsupportedError # <<<<<<<<<<<<<< - * elif errcode == error_codes._LIBSSH2_ERROR_MAC_FAILURE: - * raise exceptions.MacFailureError + * else: + * # Switch default */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_exceptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -5313,90 +5307,12 @@ static int __pyx_f_4ssh2_5utils_handle_error_codes(int __pyx_v_errcode, CYTHON_U * raise exceptions.MissingUserAuthBannerError * elif errcode == error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED: # <<<<<<<<<<<<<< * raise exceptions.AlgoUnsupportedError - * elif errcode == error_codes._LIBSSH2_ERROR_MAC_FAILURE: -*/ - break; - case LIBSSH2_ERROR_MAC_FAILURE: - - /* "ssh2/utils.pyx":232 - * raise exceptions.AlgoUnsupportedError - * elif errcode == error_codes._LIBSSH2_ERROR_MAC_FAILURE: - * raise exceptions.MacFailureError # <<<<<<<<<<<<<< - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_INIT: - * raise exceptions.HashInitError -*/ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MacFailureError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 232, __pyx_L1_error) - - /* "ssh2/utils.pyx":231 - * elif errcode == error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED: - * raise exceptions.AlgoUnsupportedError - * elif errcode == error_codes._LIBSSH2_ERROR_MAC_FAILURE: # <<<<<<<<<<<<<< - * raise exceptions.MacFailureError - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_INIT: -*/ - break; - case LIBSSH2_ERROR_HASH_INIT: - - /* "ssh2/utils.pyx":234 - * raise exceptions.MacFailureError - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_INIT: - * raise exceptions.HashInitError # <<<<<<<<<<<<<< - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_CALC: - * raise exceptions.HashCalcError -*/ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_exceptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HashInitError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 234, __pyx_L1_error) - - /* "ssh2/utils.pyx":233 - * elif errcode == error_codes._LIBSSH2_ERROR_MAC_FAILURE: - * raise exceptions.MacFailureError - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_INIT: # <<<<<<<<<<<<<< - * raise exceptions.HashInitError - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_CALC: -*/ - break; - case LIBSSH2_ERROR_HASH_CALC: - - /* "ssh2/utils.pyx":236 - * raise exceptions.HashInitError - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_CALC: - * raise exceptions.HashCalcError # <<<<<<<<<<<<<< - * else: - * # Switch default -*/ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HashCalcError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 236, __pyx_L1_error) - - /* "ssh2/utils.pyx":235 - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_INIT: - * raise exceptions.HashInitError - * elif errcode == error_codes._LIBSSH2_ERROR_HASH_CALC: # <<<<<<<<<<<<<< - * raise exceptions.HashCalcError * else: */ break; default: - /* "ssh2/utils.pyx":239 + /* "ssh2/utils.pyx":233 * else: * # Switch default * if errcode < 0: # <<<<<<<<<<<<<< @@ -5406,46 +5322,46 @@ static int __pyx_f_4ssh2_5utils_handle_error_codes(int __pyx_v_errcode, CYTHON_U __pyx_t_3 = (__pyx_v_errcode < 0); if (unlikely(__pyx_t_3)) { - /* "ssh2/utils.pyx":240 + /* "ssh2/utils.pyx":234 * # Switch default * if errcode < 0: * raise exceptions.UnknownError("Error code %s not known", errcode) # <<<<<<<<<<<<<< * return errcode */ - __pyx_t_1 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_exceptions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_exceptions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnknownError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnknownError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_errcode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_errcode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); - assert(__pyx_t_1); + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Error_code_s_not_known, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Error_code_s_not_known, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); } - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 234, __pyx_L1_error) - /* "ssh2/utils.pyx":239 + /* "ssh2/utils.pyx":233 * else: * # Switch default * if errcode < 0: # <<<<<<<<<<<<<< @@ -5454,7 +5370,7 @@ static int __pyx_f_4ssh2_5utils_handle_error_codes(int __pyx_v_errcode, CYTHON_U */ } - /* "ssh2/utils.pyx":241 + /* "ssh2/utils.pyx":235 * if errcode < 0: * raise exceptions.UnknownError("Error code %s not known", errcode) * return errcode # <<<<<<<<<<<<<< @@ -6219,8 +6135,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_EncryptError, sizeof(__pyx_k_EncryptError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EncryptError */ {__pyx_k_Error_code_s_not_known, sizeof(__pyx_k_Error_code_s_not_known), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Error_code_s_not_known */ {__pyx_k_FileError, sizeof(__pyx_k_FileError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FileError */ - {__pyx_k_HashCalcError, sizeof(__pyx_k_HashCalcError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HashCalcError */ - {__pyx_k_HashInitError, sizeof(__pyx_k_HashInitError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HashInitError */ {__pyx_k_HostkeyInitError, sizeof(__pyx_k_HostkeyInitError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HostkeyInitError */ {__pyx_k_HostkeySignError, sizeof(__pyx_k_HostkeySignError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HostkeySignError */ {__pyx_k_InvalidMACError, sizeof(__pyx_k_InvalidMACError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_InvalidMACError */ @@ -6230,7 +6144,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_KeyExchangeError, sizeof(__pyx_k_KeyExchangeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_KeyExchangeError */ {__pyx_k_KeyfileAuthFailedError, sizeof(__pyx_k_KeyfileAuthFailedError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_KeyfileAuthFailedError */ {__pyx_k_KnownHostError, sizeof(__pyx_k_KnownHostError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_KnownHostError */ - {__pyx_k_MacFailureError, sizeof(__pyx_k_MacFailureError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MacFailureError */ {__pyx_k_MethodNoneError, sizeof(__pyx_k_MethodNoneError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MethodNoneError */ {__pyx_k_MethodNotSupported, sizeof(__pyx_k_MethodNotSupported), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MethodNotSupported */ {__pyx_k_MissingUserAuthBannerError, sizeof(__pyx_k_MissingUserAuthBannerError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MissingUserAuthBannerError */ @@ -6388,7 +6301,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_utils_pyx, __pyx_mstate->__pyx_n_u_wait_socket, __pyx_k_31_2_Q_q_aq_x_DA_q_x_EQ_6_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 116, 805}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 116, 763}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_errcode}; __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_utils_pyx, __pyx_mstate->__pyx_n_u_handle_error_codes, __pyx_k_2_xs_q_q_q_q_j_q_j_q_j_q_j_q_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; } diff --git a/ssh2/utils.pyx b/ssh2/utils.pyx index 8ee40efe..d96accff 100644 --- a/ssh2/utils.pyx +++ b/ssh2/utils.pyx @@ -228,12 +228,6 @@ cpdef int handle_error_codes(int errcode) except -1: raise exceptions.MissingUserAuthBannerError elif errcode == error_codes._LIBSSH2_ERROR_ALGO_UNSUPPORTED: raise exceptions.AlgoUnsupportedError - elif errcode == error_codes._LIBSSH2_ERROR_MAC_FAILURE: - raise exceptions.MacFailureError - elif errcode == error_codes._LIBSSH2_ERROR_HASH_INIT: - raise exceptions.HashInitError - elif errcode == error_codes._LIBSSH2_ERROR_HASH_CALC: - raise exceptions.HashCalcError else: # Switch default if errcode < 0: diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index c2f6c294..b2c9804b 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -22,8 +22,7 @@ LIBSSH2_ERROR_AGENT_PROTOCOL, LIBSSH2_ERROR_SOCKET_RECV, \ LIBSSH2_ERROR_SOCKET_SEND, LIBSSH2_ERROR_ENCRYPT, \ LIBSSH2_ERROR_BAD_SOCKET, LIBSSH2_ERROR_KNOWN_HOSTS, \ - LIBSSH2_ERROR_RANDGEN, LIBSSH2_ERROR_MISSING_USERAUTH_BANNER, LIBSSH2_ERROR_ALGO_UNSUPPORTED, \ - LIBSSH2_ERROR_MAC_FAILURE, LIBSSH2_ERROR_HASH_INIT, LIBSSH2_ERROR_HASH_CALC + LIBSSH2_ERROR_RANDGEN, LIBSSH2_ERROR_MISSING_USERAUTH_BANNER, LIBSSH2_ERROR_ALGO_UNSUPPORTED from ssh2.exceptions import SSH2Error, AgentError, AuthenticationError, \ AgentConnectionError, AgentAuthenticationError, AgentListIdentitiesError, \ AgentGetIdentityError, AgentProtocolError, SessionError, \ @@ -41,7 +40,7 @@ BadUseError, CompressError, OutOfBoundaryError, SocketRecvError, \ SocketSendError, EncryptError, BadSocketError, SFTPError, SFTPProtocolError, \ KnownHostError, UnknownError, RandGenError, MissingUserAuthBannerError, \ - AlgoUnsupportedError, MacFailureError, HashInitError, HashCalcError + AlgoUnsupportedError from ssh2.utils import handle_error_codes @@ -71,9 +70,6 @@ def test_general_errors(self): self.assertRaises(RandGenError, handle_error_codes, LIBSSH2_ERROR_RANDGEN) self.assertRaises(MissingUserAuthBannerError, handle_error_codes, LIBSSH2_ERROR_MISSING_USERAUTH_BANNER) self.assertRaises(AlgoUnsupportedError, handle_error_codes, LIBSSH2_ERROR_ALGO_UNSUPPORTED) - self.assertRaises(MacFailureError, handle_error_codes, LIBSSH2_ERROR_MAC_FAILURE) - self.assertRaises(HashInitError, handle_error_codes, LIBSSH2_ERROR_HASH_INIT) - self.assertRaises(HashCalcError, handle_error_codes, LIBSSH2_ERROR_HASH_CALC) def test_channel_errors(self): self.assertRaises(ChannelOutOfOrderError, handle_error_codes, LIBSSH2_ERROR_CHANNEL_OUTOFORDER)