Bläddra i källkod

Updating code to PuTTY 898cb883

Source commit: 60577af2f4392cec3f7a29d45f01d77ba83d49a2
Martin Prikryl 6 år sedan
förälder
incheckning
ec282591f1
4 ändrade filer med 7 tillägg och 8 borttagningar
  1. 2 2
      source/core/PuttyIntf.cpp
  2. 1 1
      source/core/PuttyIntf.h
  3. 2 5
      source/putty/puttyexp.h
  4. 2 0
      source/putty/ssh.h

+ 2 - 2
source/core/PuttyIntf.cpp

@@ -971,12 +971,12 @@ TStrings * SshMacList()
 //---------------------------------------------------------------------------
 UnicodeString GetCipher1Name(const ssh1_cipher * Cipher)
 {
-  return UnicodeString(UTF8String((*Cipher)->text_name));
+  return UnicodeString(UTF8String(Cipher->vt->text_name));
 }
 //---------------------------------------------------------------------------
 UnicodeString GetCipher2Name(const ssh2_cipher * Cipher)
 {
-  return UnicodeString(UTF8String((*Cipher)->text_name));
+  return UnicodeString(UTF8String(Cipher->vt->text_name));
 }
 //---------------------------------------------------------------------------
 UnicodeString GetCompressorName(const ssh_compressor * Compressor)

+ 1 - 1
source/core/PuttyIntf.h

@@ -13,11 +13,11 @@ void __fastcall DontSaveRandomSeed();
 extern "C"
 {
 #include <putty.h>
-#include <puttyexp.h>
 // To rename ssh1_cipheralg::new member, what is a keyword in C++
 #define new _new_
 #include <ssh.h>
 #undef new
+#include <puttyexp.h>
 #include <proxy.h>
 #include <storage.h>
 // Defined in misc.h - Conflicts with std::min/max

+ 2 - 5
source/putty/puttyexp.h

@@ -5,17 +5,14 @@
 
 // from ssh.c
 
-struct ssh1_cipheralg;
-typedef const struct ssh1_cipheralg *ssh1_cipher;
-struct ssh2_cipheralg;
-typedef const struct ssh2_cipheralg *ssh2_cipher;
-
 int is_ssh(Plug * plug);
 int get_ssh_version(Backend * be);
 Seat * get_ssh_seat(Plug * plug);
+#ifdef WINSCP_SSH
 const ssh1_cipher * get_cipher(Backend * be);
 const ssh2_cipher * get_cscipher(Backend * be);
 const ssh2_cipher * get_sccipher(Backend * be);
+#endif
 const struct ssh_compressor * get_cscomp(Backend * be);
 const struct ssh_decompressor * get_sccomp(Backend * be);
 #define WINSCP_QUERY_REMMAXPKT 1

+ 2 - 0
source/putty/ssh.h

@@ -1,6 +1,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#define WINSCP_SSH
+
 #include "puttymem.h"
 #include "tree234.h"
 #ifndef WINSCP_VS