1/* $OpenBSD: packet.c,v 1.229 2016/02/17 22:20:14 djm Exp $ */
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * This file contains code implementing the packet protocol and communication
7 * with the other side. This same code is used both on client and server side.
8 *
--- 24 unchanged lines hidden (view full) ---
33 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
37 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 */
39
40#include "includes.h"
41__RCSID("$FreeBSD: head/crypto/openssh/packet.c 301551 2016-06-07 16:18:09Z lidl $");
42
43#include <sys/param.h> /* MIN roundup */
44#include <sys/types.h>
45#include "openbsd-compat/sys-queue.h"
46#include <sys/socket.h>
47#ifdef HAVE_SYS_TIME_H
48# include <sys/time.h>
49#endif
--- 31 unchanged lines hidden (view full) ---
81#include "log.h"
82#include "canohost.h"
83#include "misc.h"
84#include "channels.h"
85#include "ssh.h"
86#include "packet.h"
87#include "ssherr.h"
88#include "sshbuf.h"
89#ifdef USE_BLACKLIST
90#include "blacklist_client.h"
91#endif
92
93#ifdef PACKET_DEBUG
94#define DBG(x) x
95#else
96#define DBG(x)
97#endif
98
99#define PACKET_MAX_SIZE (256 * 1024)
--- 1969 unchanged lines hidden (view full) ---
2069 }
2070 /* FALLTHROUGH */
2071 case SSH_ERR_NO_CIPHER_ALG_MATCH:
2072 case SSH_ERR_NO_MAC_ALG_MATCH:
2073 case SSH_ERR_NO_COMPRESS_ALG_MATCH:
2074 case SSH_ERR_NO_KEX_ALG_MATCH:
2075 case SSH_ERR_NO_HOSTKEY_ALG_MATCH:
2076 if (ssh && ssh->kex && ssh->kex->failed_choice) {
2077#ifdef USE_BLACKLIST
2078 blacklist_notify(1);
2079#endif
2080 fatal("Unable to negotiate with %.200s port %d: %s. "
2081 "Their offer: %s", ssh_remote_ipaddr(ssh),
2082 ssh_remote_port(ssh), ssh_err(r),
2083 ssh->kex->failed_choice);
2084 }
2085 /* FALLTHROUGH */
2086 default:
2087 fatal("%s%sConnection %s %.200s port %d: %s",
--- 894 unchanged lines hidden ---
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * This file contains code implementing the packet protocol and communication
7 * with the other side. This same code is used both on client and server side.
8 *
--- 24 unchanged lines hidden (view full) ---
33 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
37 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 */
39
40#include "includes.h"
41__RCSID("$FreeBSD: head/crypto/openssh/packet.c 301551 2016-06-07 16:18:09Z lidl $");
42
43#include <sys/param.h> /* MIN roundup */
44#include <sys/types.h>
45#include "openbsd-compat/sys-queue.h"
46#include <sys/socket.h>
47#ifdef HAVE_SYS_TIME_H
48# include <sys/time.h>
49#endif
--- 31 unchanged lines hidden (view full) ---
81#include "log.h"
82#include "canohost.h"
83#include "misc.h"
84#include "channels.h"
85#include "ssh.h"
86#include "packet.h"
87#include "ssherr.h"
88#include "sshbuf.h"
89#ifdef USE_BLACKLIST
90#include "blacklist_client.h"
91#endif
92
93#ifdef PACKET_DEBUG
94#define DBG(x) x
95#else
96#define DBG(x)
97#endif
98
99#define PACKET_MAX_SIZE (256 * 1024)
--- 1969 unchanged lines hidden (view full) ---
2069 }
2070 /* FALLTHROUGH */
2071 case SSH_ERR_NO_CIPHER_ALG_MATCH:
2072 case SSH_ERR_NO_MAC_ALG_MATCH:
2073 case SSH_ERR_NO_COMPRESS_ALG_MATCH:
2074 case SSH_ERR_NO_KEX_ALG_MATCH:
2075 case SSH_ERR_NO_HOSTKEY_ALG_MATCH:
2076 if (ssh && ssh->kex && ssh->kex->failed_choice) {
2077#ifdef USE_BLACKLIST
2078 blacklist_notify(1);
2079#endif
2080 fatal("Unable to negotiate with %.200s port %d: %s. "
2081 "Their offer: %s", ssh_remote_ipaddr(ssh),
2082 ssh_remote_port(ssh), ssh_err(r),
2083 ssh->kex->failed_choice);
2084 }
2085 /* FALLTHROUGH */
2086 default:
2087 fatal("%s%sConnection %s %.200s port %d: %s",
--- 894 unchanged lines hidden ---