Przeglądaj źródła

Updating PuTTY 0.79 (prerelease) code to C++ Builder compiler + Bumping PuTTY copyright year

Source commit: dfd52625cc98f4fbe28c9199c8c2bdcd180da377
Martin Prikryl 2 lat temu
rodzic
commit
1b7a4989a1

+ 12 - 12
source/putty/crypto/hmac.c

@@ -169,18 +169,18 @@ static const char *hmac_text_name(ssh2_mac *mac)
 
 static const struct hmac_extra ssh_hmac_sha512_extra = { &ssh_sha512, "" };
 const ssh2_macalg ssh_hmac_sha512 = {
-    .new = hmac_new,
-    .free = hmac_free,
-    .setkey = hmac_key,
-    .start = hmac_start,
-    .genresult = hmac_genresult,
-    .next_message = nullmac_next_message,
-    .text_name = hmac_text_name,
-    .name = "hmac-sha2-512",
-    .etm_name = "[email protected]",
-    .len = 64,
-    .keylen = 64,
-    .extra = &ssh_hmac_sha512_extra,
+    /*.new =*/ hmac_new,
+    /*.free =*/ hmac_free,
+    /*.setkey =*/ hmac_key,
+    /*.start =*/ hmac_start,
+    /*.genresult =*/ hmac_genresult,
+    /*.next_message =*/ nullmac_next_message,
+    /*.text_name =*/ hmac_text_name,
+    /*.name =*/ "hmac-sha2-512",
+    /*.etm_name =*/ "[email protected]",
+    /*.len =*/ 64,
+    /*.keylen =*/ 64,
+    /*.extra =*/ &ssh_hmac_sha512_extra,
 };
 
 static const struct hmac_extra ssh_hmac_sha256_extra = { &ssh_sha256, "" };

+ 6 - 1
source/putty/ssh/userauth2-client.c

@@ -264,6 +264,7 @@ static void ssh2_userauth_handle_banner_packet(struct ssh2_userauth_state *s,
     if (!s->show_banner)
         return;
 
+    { // WINSCP
     ptrlen string = get_string(pktin);
     if (string.len > BANNER_LIMIT - bufchain_size(&s->banner))
         string.len = BANNER_LIMIT - bufchain_size(&s->banner);
@@ -280,6 +281,7 @@ static void ssh2_userauth_handle_banner_packet(struct ssh2_userauth_state *s,
         put_datapl(s->banner_scc, string);
     else
         put_datapl(&s->banner_bs, string);
+    } // WINSCP
 }
 
 static void ssh2_userauth_filter_queue(struct ssh2_userauth_state *s)
@@ -2160,6 +2162,7 @@ static void ssh2_userauth_print_banner(struct ssh2_userauth_state *s)
             seat_set_trust_status(s->ppl.seat, false);
         }
 
+        { // WINSCP
         bool mid_line = false;
         while (bufchain_size(&s->banner) > 0) {
             ptrlen data = bufchain_prefix(&s->banner);
@@ -2179,6 +2182,7 @@ static void ssh2_userauth_print_banner(struct ssh2_userauth_state *s)
             seat_antispoof_msg(ppl_get_iseat(&s->ppl),
                                "End of banner message from server");
         }
+        } // WINSCP
     }
 }
 
@@ -2701,7 +2705,8 @@ static void ssh2_userauth_final_output(PacketProtocolLayer *ppl)
      * in our queue just before the server closed the connection, and
      * add them to our banner buffer.
      */
-    for (PktIn *pktin = pq_first(s->ppl.in_pq); pktin != NULL;
+    PktIn *pktin; // WINSCP
+    for (pktin = pq_first(s->ppl.in_pq); pktin != NULL;
          pktin = pq_next(s->ppl.in_pq, pktin)) {
         if (pktin->type == SSH2_MSG_USERAUTH_BANNER)
             ssh2_userauth_handle_banner_packet(s, pktin);

+ 1 - 1
source/resource/TextsCore1.rc

@@ -476,7 +476,7 @@ BEGIN
 
   CORE_VARIABLE_STRINGS, "CORE_VARIABLE"
   PUTTY_BASED_ON, "SSH and SCP code based on PuTTY %s"
-  PUTTY_COPYRIGHT, "Copyright © 1997–2022 Simon Tatham"
+  PUTTY_COPYRIGHT, "Copyright © 1997–2023 Simon Tatham"
   PUTTY_URL, "https://www.chiark.greenend.org.uk/~sgtatham/putty/"
   FILEZILLA_BASED_ON2, "FTP code based on FileZilla"
   FILEZILLA_COPYRIGHT2, "Copyright © Tim Kosse"