Forráskód Böngészése

Merge branch 'thirdparty_dev' into dev

Source commit: aaac937e6a438623d3956fbdcc4e97a595fa6783
Martin Prikryl 2 éve
szülő
commit
1eefd46566

+ 9 - 6
source/putty/logging.c

@@ -22,8 +22,9 @@ struct LogContext {
     int logtype;                       /* cached out of conf */
 };
 
-static Filename *xlatlognam(Filename *s, char *hostname, int port,
-                            struct tm *tm);
+static Filename *xlatlognam(const Filename *s,
+                            const char *hostname, int port,
+                            const struct tm *tm);
 
 /*
  * Internal wrapper function which must be called for _all_ output
@@ -173,7 +174,7 @@ void logfopen(LogContext *ctx)
         filename_free(ctx->currlogfilename);
     ctx->currlogfilename =
         xlatlognam(conf_get_filename(ctx->conf, CONF_logfilename),
-                   conf_get_str(ctx->conf, CONF_host),
+                   conf_dest(ctx->conf),    /* hostname or serial line */
                    conf_get_int(ctx->conf, CONF_port), &tm);
 
     if (open_for_write_would_lose_data(ctx->currlogfilename)) {
@@ -457,10 +458,12 @@ void log_reconfig(LogContext *ctx, Conf *conf)
  *
  * "&Y":YYYY   "&m":MM   "&d":DD   "&T":hhmmss   "&h":<hostname>   "&&":&
  */
-static Filename *xlatlognam(Filename *src, char *hostname, int port,
-                            struct tm *tm)
+static Filename *xlatlognam(const Filename *src,
+                            const char *hostname, int port,
+                            const struct tm *tm)
 {
-    char buf[32], *bufp;
+    char buf[32];
+    const char *bufp;
     int size;
     strbuf *buffer;
     const char *s;

+ 6 - 6
source/putty/putty.h

@@ -21,14 +21,14 @@
  * Fingerprints of the current and previous PGP master keys, to
  * establish a trust path between an executable and other files.
  */
-#define PGP_MASTER_KEY_YEAR "2021"
-#define PGP_MASTER_KEY_DETAILS "RSA, 3072-bit"
+#define PGP_MASTER_KEY_YEAR "2023"
+#define PGP_MASTER_KEY_DETAILS "RSA, 4096-bit"
 #define PGP_MASTER_KEY_FP                                  \
-    "A872 D42F 1660 890F 0E05  223E DD43 55EA AC11 19DE"
-#define PGP_PREV_MASTER_KEY_YEAR "2018"
-#define PGP_PREV_MASTER_KEY_DETAILS "RSA, 4096-bit"
+    "28D4 7C46 55E7 65A6 D827  AC66 B15D 9EFC 216B 06A1"
+#define PGP_PREV_MASTER_KEY_YEAR "2021"
+#define PGP_PREV_MASTER_KEY_DETAILS "RSA, 3072-bit"
 #define PGP_PREV_MASTER_KEY_FP                                  \
-    "24E1 B1C5 75EA 3C9F F752  A922 76BC 7FE4 EBFD 2D9E"
+    "A872 D42F 1660 890F 0E05  223E DD43 55EA AC11 19DE"
 
 /*
  * Definitions of three separate indexing schemes for colour palette

+ 3 - 4
source/putty/ssh/sharing.c

@@ -1774,7 +1774,7 @@ static void share_receive(Plug *plug, int urgent, const char *data, size_t len)
             char *buf = dupprintf("Version string far too long\n");
             share_disconnect(cs, buf);
             sfree(buf);
-            goto dead;
+            return;
         }
         cs->recvbuf[cs->recvlen++] = c;
     }
@@ -1789,7 +1789,7 @@ static void share_receive(Plug *plug, int urgent, const char *data, size_t len)
         char *buf = dupprintf("Version string did not have expected prefix\n");
         share_disconnect(cs, buf);
         sfree(buf);
-        goto dead;
+        return;
     }
     if (cs->recvlen > 0 && cs->recvbuf[cs->recvlen-1] == '\015')
         cs->recvlen--;                 /* trim off \r before \n */
@@ -1816,7 +1816,7 @@ static void share_receive(Plug *plug, int urgent, const char *data, size_t len)
                                   (unsigned)cs->curr_packetlen);
             share_disconnect(cs, buf);
             sfree(buf);
-            goto dead;
+            return;
         }
         while (cs->recvlen < cs->curr_packetlen) {
             crGetChar(c);
@@ -1827,7 +1827,6 @@ static void share_receive(Plug *plug, int urgent, const char *data, size_t len)
                                       cs->recvbuf + 5, cs->recvlen - 5);
     }
 
-  dead:;
     crFinishV;
 }
 

+ 15 - 0
source/putty/utils/conf_dest.c

@@ -0,0 +1,15 @@
+/*
+ * Decide whether the 'host name' or 'serial line' field of a Conf is
+ * important, based on which protocol it has selected.
+ */
+
+#include "putty.h"
+
+char const *conf_dest(Conf *conf)
+{
+    if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL)
+        return conf_get_str(conf, CONF_serline);
+    else
+        return conf_get_str(conf, CONF_host);
+}
+

+ 3 - 3
source/putty/version.h

@@ -1,5 +1,5 @@
 /* Generated by automated build script */
 #define PRERELEASE 0.79
-#define TEXTVER "Pre-release 0.79:2023-05-22.56b16bd"
-#define SSHVER "-Prerelease-0.79:20230522.56b16bd"
-#define BINARY_VERSION 0,78,33974,0
+#define TEXTVER "Pre-release 0.79:2023-08-24.27f0140"
+#define SSHVER "-Prerelease-0.79:20230824.27f0140"
+#define BINARY_VERSION 0,78,34068,0