Skip to content

Commit 01007a6

Browse files
committed
checkpoint - starting to remove debugs and tests
1 parent f21f04d commit 01007a6

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

packet.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@
103103
#define DBG(x)
104104
#endif
105105

106-
#define PACKET_MAX_SIZE (36 * 1024)
106+
/* SSH_IOBUFSZ + 1k of head room */
107+
/* OpenSSH usings 256KB packet size max but that consumes a
108+
* lot of memory wiht the buffers we are using. This keeps it
109+
* in check. Doesn't seem to have an impact on performance or
110+
* functionality cjr 04/06/2023 */
111+
#define PACKET_MAX_SIZE (SSH_IOBUFSZ + 1024)
107112

108113
struct packet_state {
109114
u_int32_t seqnr;

sshd.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,24 +2342,24 @@ main(int ac, char **av)
23422342
notify_hostkeys(ssh);
23432343

23442344
#ifdef WITH_OPENSSL
2345-
/* if we are using aes-ctr there can be issues in either a fork or sandbox
2346-
* so the initial aes-ctr is defined to point to the original single process
2347-
* evp. After authentication we'll be past the fork and the sandboxed privsep
2348-
* so we repoint the define to the multithreaded evp. To start the threads we
2349-
* then force a rekey
2350-
*/
2351-
/* We now explicitly call the mt cipher in cipher.c so we don't need
2352-
* the cipher_reset_multithreaded() anymore. We just need to
2353-
* force a rekey -cjr 09/08/2022 */
2354-
const void *cc = ssh_packet_get_send_context(the_active_state);
2355-
2356-
/* only rekey if necessary. If we don't do this gcm mode cipher breaks */
2357-
if (strstr(cipher_ctx_name(cc), "ctr")) {
2358-
debug("Single to Multithreaded CTR cipher swap - server request");
2359-
/* cipher_reset_multithreaded(); */
2360-
ssh_packet_set_authenticated(ssh);
2361-
packet_request_rekeying();
2362-
}
2345+
/* if we are using aes-ctr there can be issues in either a fork or sandbox
2346+
* so the initial aes-ctr is defined to point to the original single process
2347+
* evp. After authentication we'll be past the fork and the sandboxed privsep
2348+
* so we repoint the define to the multithreaded evp. To start the threads we
2349+
* then force a rekey
2350+
*/
2351+
/* We now explicitly call the mt cipher in cipher.c so we don't need
2352+
* the cipher_reset_multithreaded() anymore. We just need to
2353+
* force a rekey -cjr 09/08/2022 */
2354+
const void *cc = ssh_packet_get_send_context(the_active_state);
2355+
2356+
/* only rekey if necessary. If we don't do this gcm mode cipher breaks */
2357+
if (strstr(cipher_ctx_name(cc), "ctr")) {
2358+
debug("Single to Multithreaded CTR cipher swap - server request");
2359+
/* cipher_reset_multithreaded(); */
2360+
ssh_packet_set_authenticated(ssh);
2361+
packet_request_rekeying();
2362+
}
23632363
#endif
23642364

23652365
/* Start session. */

0 commit comments

Comments
 (0)