summaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-27 08:42:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-27 08:42:39 +0000
commit74f0fc5311d2d8dfa2c559215e2b099a34923469 (patch)
treedc9858b8784b61022d2bdae82116ab44087666c5 /packet.c
parentAdding upstream version 1:9.8p1. (diff)
downloadopenssh-upstream.tar.xz
openssh-upstream.zip
Adding upstream version 1:9.9p1.upstream/1%9.9p1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/packet.c b/packet.c
index 4fca8d6..486f851 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.315 2024/05/31 08:49:35 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
@@ -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) {
@@ -2637,12 +2636,6 @@ sshpkt_put_stringb(struct ssh *ssh, const struct sshbuf *v)
return sshbuf_put_stringb(ssh->state->outgoing_packet, v);
}
-int
-sshpkt_getb_froms(struct ssh *ssh, struct sshbuf **valp)
-{
- return sshbuf_froms(ssh->state->incoming_packet, valp);
-}
-
#ifdef WITH_OPENSSL
#ifdef OPENSSL_HAS_ECC
int
@@ -2650,8 +2643,13 @@ sshpkt_put_ec(struct ssh *ssh, const EC_POINT *v, const EC_GROUP *g)
{
return sshbuf_put_ec(ssh->state->outgoing_packet, v, g);
}
-#endif /* OPENSSL_HAS_ECC */
+int
+sshpkt_put_ec_pkey(struct ssh *ssh, EVP_PKEY *pkey)
+{
+ return sshbuf_put_ec_pkey(ssh->state->outgoing_packet, pkey);
+}
+#endif /* OPENSSL_HAS_ECC */
int
sshpkt_put_bignum2(struct ssh *ssh, const BIGNUM *v)
@@ -2710,6 +2708,12 @@ sshpkt_get_cstring(struct ssh *ssh, char **valp, size_t *lenp)
return sshbuf_get_cstring(ssh->state->incoming_packet, valp, lenp);
}
+int
+sshpkt_getb_froms(struct ssh *ssh, struct sshbuf **valp)
+{
+ return sshbuf_froms(ssh->state->incoming_packet, valp);
+}
+
#ifdef WITH_OPENSSL
#ifdef OPENSSL_HAS_ECC
int