Skip to content

Commit 88df8f6

Browse files
author
Panos
committed
Added trace function to session. Added trace bitmasks.
TODO: Optionally enable debug build in _setup_libssh2 to ease debugging.
1 parent 44d5617 commit 88df8f6

File tree

5 files changed

+940
-701
lines changed

5 files changed

+940
-701
lines changed

_setup_libssh2.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ def build_ssh2():
2020
os.chdir('src')
2121
check_call('cmake ../libssh2 -DBUILD_SHARED_LIBS=ON \
2222
-DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON \
23-
-DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL',
23+
-DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL \
24+
-DENABLE_DEBUG_LOGGING=ON',
2425
shell=True, env=os.environ)
25-
check_call('cmake --build . --config Release', shell=True, env=os.environ)
26+
# check_call('cmake --build . --config Release', shell=True, env=os.environ)
27+
check_call('cmake --build . --config Debug', shell=True, env=os.environ)
2628
os.chdir('..')
2729

2830
for src in glob('src/src/libssh2.so*'):

ssh2/c_ssh2.pxd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,3 +455,13 @@ cdef extern from "libssh2.h" nogil:
455455
const char *path)
456456
IF HAVE_AGENT_FWD:
457457
int libssh2_channel_request_auth_agent(LIBSSH2_CHANNEL *channel)
458+
enum:
459+
LIBSSH2_TRACE_TRANS
460+
LIBSSH2_TRACE_KEX
461+
LIBSSH2_TRACE_AUTH
462+
LIBSSH2_TRACE_CONN
463+
LIBSSH2_TRACE_SCP
464+
LIBSSH2_TRACE_SFTP
465+
LIBSSH2_TRACE_ERROR
466+
LIBSSH2_TRACE_PUBLICKEY
467+
LIBSSH2_TRACE_SOCKET

0 commit comments

Comments
 (0)