Skip to content

Commit

Permalink
Merge branch 'openssh:master' into print-key
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty287 authored Aug 27, 2024
2 parents 2513f2e + 10ccf61 commit ffc3717
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
6 changes: 3 additions & 3 deletions cipher.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: cipher.c,v 1.122 2024/08/14 15:42:18 tobias Exp $ */
/* $OpenBSD: cipher.c,v 1.123 2024/08/23 04:51:00 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
Expand Down Expand Up @@ -143,8 +143,8 @@ const char *
compression_alg_list(int compression)
{
#ifdef WITH_ZLIB
return compression ? "zlib@openssh.com,zlib,none" :
"none,zlib@openssh.com,zlib";
return compression ? "zlib@openssh.com,none" :
"none,zlib@openssh.com";
#else
return "none";
#endif
Expand Down
4 changes: 1 addition & 3 deletions kex.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: kex.c,v 1.186 2024/05/17 00:30:23 djm Exp $ */
/* $OpenBSD: kex.c,v 1.187 2024/08/23 04:51:00 deraadt Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -842,8 +842,6 @@ choose_comp(struct sshcomp *comp, char *client, char *server)
#ifdef WITH_ZLIB
if (strcmp(name, "zlib@openssh.com") == 0) {
comp->type = COMP_DELAYED;
} else if (strcmp(name, "zlib") == 0) {
comp->type = COMP_ZLIB;
} else
#endif /* WITH_ZLIB */
if (strcmp(name, "none") == 0) {
Expand Down
4 changes: 1 addition & 3 deletions kex.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: kex.h,v 1.124 2024/08/22 23:11:30 djm Exp $ */
/* $OpenBSD: kex.h,v 1.125 2024/08/23 04:51:00 deraadt Exp $ */

/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
Expand Down Expand Up @@ -66,8 +66,6 @@
#define KEX_SNTRUP761X25519_SHA512_OLD "sntrup761x25519-sha512@openssh.com"

#define COMP_NONE 0
/* pre-auth compression (COMP_ZLIB) is only supported in the client */
#define COMP_ZLIB 1
#define COMP_DELAYED 2

#define CURVE25519_SIZE 32
Expand Down
7 changes: 3 additions & 4 deletions packet.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: packet.c,v 1.316 2024/08/15 00:51:51 djm Exp $ */
/* $OpenBSD: packet.c,v 1.317 2024/08/23 04:51:00 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
Expand Down Expand Up @@ -1015,9 +1015,8 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
/* explicit_bzero(enc->iv, enc->block_size);
explicit_bzero(enc->key, enc->key_len);
explicit_bzero(mac->key, mac->key_len); */
if ((comp->type == COMP_ZLIB ||
(comp->type == COMP_DELAYED &&
state->after_authentication)) && comp->enabled == 0) {
if (((comp->type == COMP_DELAYED && state->after_authentication)) &&
comp->enabled == 0) {
if ((r = ssh_packet_init_compression(ssh)) < 0)
return r;
if (mode == MODE_OUT) {
Expand Down
4 changes: 2 additions & 2 deletions readconf.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: readconf.c,v 1.387 2024/05/17 02:39:11 jsg Exp $ */
/* $OpenBSD: readconf.c,v 1.388 2024/08/23 04:51:00 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
Expand Down Expand Up @@ -1002,7 +1002,7 @@ static const struct multistate multistate_pubkey_auth[] = {
};
static const struct multistate multistate_compression[] = {
#ifdef WITH_ZLIB
{ "yes", COMP_ZLIB },
{ "yes", COMP_DELAYED },
#endif
{ "no", COMP_NONE },
{ NULL, -1 }
Expand Down

0 comments on commit ffc3717

Please sign in to comment.