Changeset View
Changeset View
Standalone View
Standalone View
crypto/openssh/packet.c
Show All 32 Lines | |||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
*/ | */ | ||||
#include "includes.h" | #include "includes.h" | ||||
__RCSID("$FreeBSD$"); | |||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include "openbsd-compat/sys-queue.h" | #include "openbsd-compat/sys-queue.h" | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#ifdef HAVE_SYS_TIME_H | #ifdef HAVE_SYS_TIME_H | ||||
# include <sys/time.h> | # include <sys/time.h> | ||||
#endif | #endif | ||||
Show All 39 Lines | |||||
#include "log.h" | #include "log.h" | ||||
#include "canohost.h" | #include "canohost.h" | ||||
#include "misc.h" | #include "misc.h" | ||||
#include "channels.h" | #include "channels.h" | ||||
#include "ssh.h" | #include "ssh.h" | ||||
#include "packet.h" | #include "packet.h" | ||||
#include "ssherr.h" | #include "ssherr.h" | ||||
#include "sshbuf.h" | #include "sshbuf.h" | ||||
#include "blacklist_client.h" | |||||
#ifdef PACKET_DEBUG | #ifdef PACKET_DEBUG | ||||
#define DBG(x) x | #define DBG(x) x | ||||
#else | #else | ||||
#define DBG(x) | #define DBG(x) | ||||
#endif | #endif | ||||
#define PACKET_MAX_SIZE (256 * 1024) | #define PACKET_MAX_SIZE (256 * 1024) | ||||
▲ Show 20 Lines • Show All 1,732 Lines • ▼ Show 20 Lines | case SSH_ERR_SYSTEM_ERROR: | ||||
} | } | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
case SSH_ERR_NO_CIPHER_ALG_MATCH: | case SSH_ERR_NO_CIPHER_ALG_MATCH: | ||||
case SSH_ERR_NO_MAC_ALG_MATCH: | case SSH_ERR_NO_MAC_ALG_MATCH: | ||||
case SSH_ERR_NO_COMPRESS_ALG_MATCH: | case SSH_ERR_NO_COMPRESS_ALG_MATCH: | ||||
case SSH_ERR_NO_KEX_ALG_MATCH: | case SSH_ERR_NO_KEX_ALG_MATCH: | ||||
case SSH_ERR_NO_HOSTKEY_ALG_MATCH: | case SSH_ERR_NO_HOSTKEY_ALG_MATCH: | ||||
if (ssh && ssh->kex && ssh->kex->failed_choice) { | if (ssh && ssh->kex && ssh->kex->failed_choice) { | ||||
BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "ssh"); | |||||
ssh_packet_clear_keys(ssh); | ssh_packet_clear_keys(ssh); | ||||
logdie("Unable to negotiate with %s: %s. " | logdie("Unable to negotiate with %s: %s. " | ||||
"Their offer: %s", remote_id, ssh_err(r), | "Their offer: %s", remote_id, ssh_err(r), | ||||
ssh->kex->failed_choice); | ssh->kex->failed_choice); | ||||
} | } | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
default: | default: | ||||
if (vasprintf(&tag, fmt, ap) == -1) { | if (vasprintf(&tag, fmt, ap) == -1) { | ||||
▲ Show 20 Lines • Show All 853 Lines • Show Last 20 Lines |