puttyexp.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #ifndef PUTTY_PUTTYEXP_H
  2. #define PUTTY_PUTTYEXP_H
  3. #include "defs.h"
  4. // from ssh.c
  5. int is_ssh(Plug * plug);
  6. int get_ssh_version(Backend * be);
  7. Seat * get_ssh_seat(Plug * plug);
  8. #ifdef WINSCP_SSH
  9. const ssh_cipher * get_cipher(Backend * be);
  10. const ssh_cipher * get_cscipher(Backend * be);
  11. const ssh_cipher * get_sccipher(Backend * be);
  12. #endif
  13. const struct ssh_compressor * get_cscomp(Backend * be);
  14. const struct ssh_decompressor * get_sccomp(Backend * be);
  15. #define WINSCP_QUERY_REMMAXPKT 1
  16. #define WINSCP_QUERY_MAIN_CHANNEL 2
  17. #define WINSCP_QUERY_TIMER 3
  18. unsigned int winscp_query(Backend * be, int query);
  19. void md5checksum(const char * buffer, int len, unsigned char output[16]);
  20. typedef const struct ssh_keyalg * cp_ssh_keyalg;
  21. void get_hostkey_algs(int * count, cp_ssh_keyalg * SignKeys);
  22. void get_macs(int * count, const struct ssh2_macalg *** amacs);
  23. int have_any_ssh2_hostkey(Seat * seat, const char * host, int port);
  24. // from wingss.c
  25. #ifndef SSH2_GSS_OIDTYPE
  26. #include "sshgss.h"
  27. #endif
  28. void wingss_cleanup(void);
  29. // from portfwd.c
  30. int is_pfwd(Plug * plug);
  31. Seat * get_pfwd_seat(Plug * plug);
  32. // for winstore.c
  33. #include "winstuff.h"
  34. long reg_open_winscp_key(HKEY Key, const char * SubKey, HKEY * Result);
  35. long reg_create_winscp_key(HKEY Key, const char * SubKey, HKEY * Result);
  36. long reg_query_winscp_value_ex(HKEY Key, const char * ValueName,
  37. unsigned long * Reserved, unsigned long * Type, unsigned char * Data,
  38. unsigned long * DataSize);
  39. long reg_set_winscp_value_ex(HKEY Key, const char * ValueName, unsigned long Reserved,
  40. unsigned long Type, const unsigned char * Data, unsigned long DataSize);
  41. long reg_close_winscp_key(HKEY Key);
  42. // from winnet.c
  43. void select_result(WPARAM wParam, LPARAM lParam);
  44. // from sshaes.c
  45. typedef void AESContext;
  46. AESContext * aes_make_context();
  47. void aes_free_context(AESContext * ctx);
  48. void aes_iv(AESContext * ctx, const void * iv);
  49. void call_aes_setup(AESContext * ctx, unsigned char * key, int keylen);
  50. void call_aes_sdctr(unsigned char *blk, int len, AESContext * ctx);
  51. // from sshaesold.c
  52. void *aesold_make_context(void);
  53. void aesold_free_context(void *handle);
  54. void call_aesold_setup(void * ctx, int blocklen, unsigned char * key, int keylen);
  55. void call_aesold_encrypt(void * ctx, unsigned int * block);
  56. // from winmisc.c
  57. void win_misc_cleanup();
  58. // from misc.c
  59. const char * get_putty_version();
  60. // from winsecur.c
  61. void win_secur_cleanup(void);
  62. // from sshecc.c
  63. void ec_cleanup(void);
  64. #endif