Rev 9114 | Rev 9216 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9114 | Rev 9132 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | BUFFERSIZE = 64*1024 ; Must be at least 32K according rfc4253#section-6.1 |
23 | BUFFERSIZE = 64*1024 ; Must be at least 32K according rfc4253#section-6.1 |
24 | PACKETSIZE = 32*1024 ; Must be at least 32K according rfc4253#section-6.1 |
24 | PACKETSIZE = 32*1024 ; Must be at least 32K according rfc4253#section-6.1 |
25 | MAX_BITS = 8192 |
25 | MAX_BITS = 8192 |
Line 26... | Line 26... | ||
26 | 26 | ||
27 | DH_PRIVATE_KEY_SIZE = 256 |
27 | DH_PRIVATE_KEY_SIZE = 256 |
28 | MAX_INPUT_LENGTH = 255 ;;; WHAT WAS THIS AGAIN ?! |
28 | MAX_INPUT_LENGTH = 255 |
29 | MAX_USERNAME_LENGTH = 256 |
29 | MAX_USERNAME_LENGTH = 256 |
30 | MAX_PASSWORD_LENGTH = 256 |
30 | MAX_PASSWORD_LENGTH = 256 |
31 | MAX_HOSTNAME_LENGTH = 4096 |
31 | MAX_HOSTNAME_LENGTH = 4096 |
Line 420... | Line 420... | ||
420 | con_in_thread: |
420 | con_in_thread: |
Line 421... | Line 421... | ||
421 | 421 | ||
422 | .loop: |
422 | .loop: |
Line 423... | Line 423... | ||
423 | ; TODO: check if channel is still open somehow |
423 | ; TODO: check if channel is still open somehow |
424 | 424 | ||
425 | invoke con_get_input, ssh_msg_channel_data.data, MAX_INPUT_LENGTH |
425 | invoke con_get_input, keyb_input, MAX_INPUT_LENGTH |
Line -... | Line 426... | ||
- | 426 | test eax, eax |
|
- | 427 | jz .no_input |
|
- | 428 | ||
- | 429 | mov ecx, eax |
|
- | 430 | mov esi, keyb_input |
|
426 | test eax, eax |
431 | mov edi, ssh_msg_channel_data.data |
- | 432 | call recode_to_utf8 |
|
427 | jz .no_input |
433 | |
428 | 434 | lea eax, [edi - ssh_msg_channel_data.data] |
|
429 | lea ecx, [eax + ssh_msg_channel_data.data - ssh_msg_channel_data] |
435 | lea ecx, [edi - ssh_msg_channel_data] |
430 | bswap eax |
436 | bswap eax |
431 | mov [ssh_msg_channel_data.len], eax |
437 | mov [ssh_msg_channel_data.len], eax |
Line 479... | Line 485... | ||
479 | 485 | ||
480 | 486 | ||
481 | ssh_ident_ha: |
487 | ssh_ident_ha: |
482 | dd_n (ssh_msg_ident.length-2) |
488 | dd_n (ssh_msg_ident.length-2) |
483 | ssh_msg_ident: |
489 | ssh_msg_ident: |
Line 484... | Line 490... | ||
484 | db "SSH-2.0-KolibriOS_SSH_0.08",13,10 |
490 | db "SSH-2.0-KolibriOS_SSH_0.09",13,10 |
485 | .length = $ - ssh_msg_ident |
491 | .length = $ - ssh_msg_ident |
Line 575... | Line 581... | ||
575 | 581 | ||
576 | ssh_msg_channel_data: |
582 | ssh_msg_channel_data: |
577 | db SSH_MSG_CHANNEL_DATA |
583 | db SSH_MSG_CHANNEL_DATA |
578 | dd_n 0 ; Sender channel |
584 | dd_n 0 ; Sender channel |
579 | .len dd ? |
585 | .len dd ? |
Line 580... | Line 586... | ||
580 | .data rb MAX_INPUT_LENGTH + 1 |
586 | .data rb 4*MAX_INPUT_LENGTH + 1 |
581 | 587 | ||
582 | 588 | ||
Line 641... | Line 647... | ||
641 | params rb MAX_HOSTNAME_LENGTH |
647 | params rb MAX_HOSTNAME_LENGTH |
Line 642... | Line 648... | ||
642 | 648 | ||
643 | ssh_con sshlib_connection |
649 | ssh_con sshlib_connection |
Line -... | Line 650... | ||
- | 650 | ssh_chan sshlib_channel |
|
- | 651 | ||
644 | ssh_chan sshlib_channel |
652 | keyb_input rb MAX_INPUT_LENGTH |