Nothing Special   »   [go: up one dir, main page]

Skip to content

Commit

Permalink
Merged Changes From PuTTY 0.80
Browse files Browse the repository at this point in the history
  • Loading branch information
NoMoreFood committed Dec 18, 2023
1 parent 1433113 commit ef48e57
Show file tree
Hide file tree
Showing 58 changed files with 924 additions and 374 deletions.
2 changes: 1 addition & 1 deletion code/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ Makefile
/windows/*.suo
/windows/*.msi
/windows/*.wixobj
/windows/*.wixpdb
/windows/*.wixpdb
2 changes: 1 addition & 1 deletion code/Buildscr
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module putty
ifeq "$(RELEASE)" "" set Ndate $(!builddate)
ifneq "$(Ndate)" "" in . do echo $(Ndate) | perl -pe 's/(....)(..)(..)/$$1-$$2-$$3/' > date
ifneq "$(Ndate)" "" read Date date
set Epoch 18595 # update this at every release
set Epoch 18707 # update this at every release
ifneq "$(Ndate)" "" in . do echo $(Ndate) | perl -ne 'use Time::Local; /(....)(..)(..)/ and print timegm(0,0,0,$$3,$$2-1,$$1) / 86400 - $(Epoch)' > days
ifneq "$(Ndate)" "" read Days days

Expand Down
2 changes: 2 additions & 0 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ if(PUTTY_CAC)
enable_language(CXX)
endif()

set(CMAKE_C_STANDARD 99)

include(cmake/setup.cmake)

# Scan the docs directory first, so that when we start calling
Expand Down
14 changes: 2 additions & 12 deletions code/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
#include "misc.h"
#include "console.h"

const char weakcrypto_msg_common_fmt[] =
"The first %s supported by the server is\n"
"%s, which is below the configured warning threshold.\n";

const char weakhk_msg_common_fmt[] =
"The first host key type we have stored for this server\n"
"is %s, which is below the configured warning threshold.\n"
"The server also provides the following types of host key\n"
"above the threshold, which we do not have stored:\n"
"%s\n";

const char console_continue_prompt[] = "Continue with connection? (y/n) ";
const char console_abandoned_msg[] = "Connection abandoned.\n";

const SeatDialogPromptDescriptions *console_prompt_descriptions(Seat *seat)
Expand All @@ -30,6 +18,8 @@ const SeatDialogPromptDescriptions *console_prompt_descriptions(Seat *seat)
.hk_connect_once_action = "enter \"n\"",
.hk_cancel_action = "press Return",
.hk_cancel_action_Participle = "Pressing Return",
.weak_accept_action = "enter \"y\"",
.weak_cancel_action = "enter \"n\"",
};
return &descs;
}
Expand Down
16 changes: 10 additions & 6 deletions code/crypto/aes-select.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,26 @@ static ssh_cipher *aes_select(const ssh_cipheralg *alg)
__VA_ARGS__ \
}

AES_SELECTOR_VTABLE(cbc, "aes128-cbc", "CBC", 128, );
AES_SELECTOR_VTABLE(cbc, "aes192-cbc", "CBC", 192, );
AES_SELECTOR_VTABLE(cbc, "aes256-cbc", "CBC", 256, );
AES_SELECTOR_VTABLE(cbc, "aes128-cbc", "CBC", 128, .flags = SSH_CIPHER_IS_CBC);
AES_SELECTOR_VTABLE(cbc, "aes192-cbc", "CBC", 192, .flags = SSH_CIPHER_IS_CBC);
AES_SELECTOR_VTABLE(cbc, "aes256-cbc", "CBC", 256, .flags = SSH_CIPHER_IS_CBC);
AES_SELECTOR_VTABLE(sdctr, "aes128-ctr", "SDCTR", 128, );
AES_SELECTOR_VTABLE(sdctr, "aes192-ctr", "SDCTR", 192, );
AES_SELECTOR_VTABLE(sdctr, "aes256-ctr", "SDCTR", 256, );
AES_SELECTOR_VTABLE(gcm, "aes128-gcm@openssh.com", "GCM", 128,
.required_mac = &ssh2_aesgcm_mac);
.required_mac = &ssh2_aesgcm_mac,
.flags = SSH_CIPHER_SEPARATE_LENGTH);
AES_SELECTOR_VTABLE(gcm, "aes256-gcm@openssh.com", "GCM", 256,
.required_mac = &ssh2_aesgcm_mac);
.required_mac = &ssh2_aesgcm_mac,
.flags = SSH_CIPHER_SEPARATE_LENGTH);

/* 192-bit AES-GCM is included only so that testcrypt can run standard
* test vectors against it. OpenSSH doesn't define a protocol id for
* it. Hence setting its ssh2_id to NULL here, and more importantly,
* leaving it out of aesgcm_list[] below. */
AES_SELECTOR_VTABLE(gcm, NULL, "GCM", 192,
.required_mac = &ssh2_aesgcm_mac);
.required_mac = &ssh2_aesgcm_mac,
.flags = SSH_CIPHER_SEPARATE_LENGTH);

static const ssh_cipheralg ssh_rijndael_lysator = {
/* Same as aes256_cbc, but with a different protocol ID */
Expand All @@ -84,6 +87,7 @@ static const ssh_cipheralg ssh_rijndael_lysator = {
.blksize = 16,
.real_keybits = 256,
.padded_keybytes = 256/8,
.flags = SSH_CIPHER_IS_CBC,
.text_name = "AES-256 CBC (dummy selector vtable)",
.extra = ssh_aes256_cbc_impls,
};
Expand Down
2 changes: 1 addition & 1 deletion code/doc/html/AppendixA.html
Original file line number Diff line number Diff line change
Expand Up @@ -1023,5 +1023,5 @@ <h3><a name="faq-pronounce"></a><a name="QA.10.4"></a>A.10.4 How do I pronounce
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/AppendixB.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,5 +289,5 @@ <h2><a name="feedback-address"></a><a name="SB.12"></a>B.12 E-mail address</h2>
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/AppendixC.html
Original file line number Diff line number Diff line change
Expand Up @@ -350,5 +350,5 @@ <h3><a name="ppk-v1"></a><a name="SC.5.2"></a>C.5.2 Version 1</h3>
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/AppendixD.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ <h1><a name="licence"></a><a name="AD"></a>Appendix D: PuTTY <a name="i0"></a>Li
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/AppendixE.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,5 +417,5 @@ <h2><a name="udp-perfection"></a><a name="SE.13"></a>E.13 Do as we say, not as w
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/AppendixF.html
Original file line number Diff line number Diff line change
Expand Up @@ -307,5 +307,5 @@ <h2><a name="pgpkeys-rollover"></a><a name="SF.3"></a>F.3 Key rollover</h2>
</dl>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/AppendixG.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@ <h2><a name="sshnames-agent"></a><a name="SG.4"></a>G.4 Agent extension request
</dl>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/AppendixH.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,5 +455,5 @@ <h2><a name="authplugin-refs"></a><a name="SH.7"></a>H.7 References</h2>
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter1.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ <h2><a name="which-one"></a><a name="S1.2"></a>1.2 How do SSH, Telnet, Rlogin, a
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter10.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,5 +268,5 @@ <h2><a name="errors-cannotassignaddress"></a><a name="S10.20"></a>10.20 &#8216;N
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter2.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ <h2><a name="gs-logout"></a><a name="S2.5"></a>2.5 <a name="i28"></a>Logging out
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter3.html
Original file line number Diff line number Diff line change
Expand Up @@ -809,5 +809,5 @@ <h4><a name="using-cmdline-host-ca"></a><a name="S3.11.3.29"></a>3.11.3.29 <a na
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter4.html
Original file line number Diff line number Diff line change
Expand Up @@ -2792,5 +2792,5 @@ <h2><a name="config-file"></a><a name="S4.33"></a>4.33 <a name="i464"></a>Storin
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
4 changes: 2 additions & 2 deletions code/doc/html/Chapter5.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2><a name="pscp-usage"></a><a name="S5.2"></a>5.2 PSCP Usage</h2>
</p>
<pre><code>C:\&gt;pscp
PuTTY Secure Copy client
Release 0.79
Release 0.80
Usage: pscp [options] [user@]host:source target
pscp [options] source [source...] [user@]host:target
pscp [options] -ls [user@]host:filespec
Expand Down Expand Up @@ -271,5 +271,5 @@ <h3><a name="pscp-pubkey"></a><a name="S5.2.4"></a>5.2.4 Using <a name="i38"></a
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter6.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,5 +535,5 @@ <h2><a name="psftp-pubkey"></a><a name="S6.3"></a>6.3 Using <a name="i40"></a>pu
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
4 changes: 2 additions & 2 deletions code/doc/html/Chapter7.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2><a name="plink-usage"></a><a name="S7.2"></a>7.2 Using Plink</h2>
</p>
<pre><code>C:\&gt;plink
Plink: command-line connection utility
Release 0.79
Release 0.80
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
Expand Down Expand Up @@ -382,5 +382,5 @@ <h2><a name="plink-wincvs"></a><a name="S7.5"></a>7.5 Using Plink with <a name="
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter8.html
Original file line number Diff line number Diff line change
Expand Up @@ -475,5 +475,5 @@ <h2><a name="pubkey-gettingready"></a><a name="S8.3"></a>8.3 Getting ready for p
</ul>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/Chapter9.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,5 @@ <h2><a name="pageant-security"></a><a name="S9.6"></a>9.6 Security consideration
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/IndexPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -1001,5 +1001,5 @@ <h1><a name="Index"></a>Index</h1><p>
<code>xterm</code>: <a href="Chapter3.html#i4">Section 3.1.1</a>, <a href="Chapter4.html#i61">Section 4.4.2</a>, <a href="Chapter4.html#i65">Section 4.4.3</a>, <a href="Chapter4.html#i69">Section 4.4.3</a>, <a href="Chapter4.html#i179">Section 4.11.1</a>, <a href="Chapter4.html#i264">Section 4.15.3</a><br>
<code>xterm</code> mouse reporting: <a href="Chapter3.html#i24">Section 3.1.1</a>, <a href="Chapter4.html#i94">Section 4.6.2</a>, <a href="Chapter4.html#i188">Section 4.11.2</a></p>
<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,5 @@ <h1>PuTTY User Manual</h1>
</ul>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.79]</address></body>
[PuTTY release 0.80]</address></body>
</html>
2 changes: 1 addition & 1 deletion code/doc/plink.but
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use Plink:

\c C:\>plink
\c Plink: command-line connection utility
\c Release 0.79
\c Release 0.80
\c Usage: plink [options] [user@]host [command]
\c ("host" can also be a PuTTY saved session name)
\c Options:
Expand Down
2 changes: 1 addition & 1 deletion code/doc/pscp.but
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use PSCP:

\c C:\>pscp
\c PuTTY Secure Copy client
\c Release 0.79
\c Release 0.80
\c Usage: pscp [options] [user@]host:source target
\c pscp [options] source [source...] [user@]host:target
\c pscp [options] -ls [user@]host:filespec
Expand Down
Binary file modified code/doc/putty.chm
Binary file not shown.
6 changes: 3 additions & 3 deletions code/doc/puttydoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5530,7 +5530,7 @@ Chapter 5: Using PSCP to transfer files securely

C:\>pscp
PuTTY Secure Copy client
Release 0.79
Release 0.80
Usage: pscp [options] [user@]host:source target
pscp [options] source [source...] [user@]host:target
pscp [options] -ls [user@]host:filespec
Expand Down Expand Up @@ -6452,7 +6452,7 @@ Chapter 7: Using the command-line connection tool Plink

C:\>plink
Plink: command-line connection utility
Release 0.79
Release 0.80
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
Expand Down Expand Up @@ -12479,4 +12479,4 @@ H.6.12 PLUGIN_AUTH_FAILURE
Secure Shell Protocol (SSH)' (better known by its wire id `keyboard-
interactive').

[PuTTY release 0.79]
[PuTTY release 0.80]
2 changes: 1 addition & 1 deletion code/doc/version.but
Original file line number Diff line number Diff line change
@@ -1 +1 @@
\versionid PuTTY release 0.79
\versionid PuTTY release 0.80
4 changes: 2 additions & 2 deletions code/proxy/socks4.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ static void proxy_socks4_process_queue(ProxyNegotiator *pn)

if (data[0] != SOCKS4_REPLY_VERSION) {
pn->error = dupprintf("SOCKS proxy response contained reply "
"version number %d (expected 0)",
(int)data[0]);
"version number %d (expected %d)",
(int)data[0], SOCKS4_REPLY_VERSION);
crStopV;
}

Expand Down
4 changes: 2 additions & 2 deletions code/proxy/socks5.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ static void proxy_socks5_process_queue(ProxyNegotiator *pn)
"SOCKS 5 CHAP authentication failed");
crStopV;
}
} else if (s->chap_attr==SOCKS5_AUTH_CHAP_ATTR_CHALLENGE) {
} else if (s->chap_attr == SOCKS5_AUTH_CHAP_ATTR_CHALLENGE) {
/* The CHAP challenge string. Send the response */
strbuf *response = chap_response(
make_ptrlen(s->chap_buf, s->chap_attr_len),
Expand Down Expand Up @@ -387,7 +387,7 @@ static void proxy_socks5_process_queue(ProxyNegotiator *pn)
* byte[] address, with variable size (see below)
* uint16 port
*/
put_byte(pn->output, SOCKS5_REPLY_VERSION);
put_byte(pn->output, SOCKS5_REQUEST_VERSION);
put_byte(pn->output, SOCKS_CMD_CONNECT);
put_byte(pn->output, 0); /* reserved byte */

Expand Down
Loading

0 comments on commit ef48e57

Please sign in to comment.