summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-01-19 21:36:38 +0000
committerDamien Miller <djm@mindrot.org>2019-01-20 09:02:36 +1100
commit06232038c794c7dfcb087be0ab0b3e65b09fd396 (patch)
tree94d9de6fc04514e4eb83dc80a36b03d7184385a1 /sshconnect.c
parent25b2ed667216314471bb66752442c55b95792dc3 (diff)
upstream: convert sshconnect.c to new packet API
with & ok markus@ OpenBSD-Commit-ID: 222337cf6c96c347f1022d976fac74b4257c061f
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 346f979d1..1a5f6a4c8 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.310 2019/01/19 21:31:32 djm Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.311 2019/01/19 21:36:38 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -70,9 +70,6 @@
70#include "authfd.h" 70#include "authfd.h"
71#include "kex.h" 71#include "kex.h"
72 72
73#include "opacket.h" /* XXX */
74extern struct ssh *active_state; /* XXX */
75
76struct sshkey *previous_host_key = NULL; 73struct sshkey *previous_host_key = NULL;
77 74
78static int matching_host_key_dns = 0; 75static int matching_host_key_dns = 0;
@@ -1285,24 +1282,6 @@ ssh_login(struct ssh *ssh, Sensitive *sensitive, const char *orighost,
1285 free(local_user); 1282 free(local_user);
1286} 1283}
1287 1284
1288void
1289ssh_put_password(char *password)
1290{
1291 int size;
1292 char *padded;
1293
1294 if (datafellows & SSH_BUG_PASSWORDPAD) {
1295 packet_put_cstring(password);
1296 return;
1297 }
1298 size = ROUNDUP(strlen(password) + 1, 32);
1299 padded = xcalloc(1, size);
1300 strlcpy(padded, password, size);
1301 packet_put_string(padded, size);
1302 explicit_bzero(padded, size);
1303 free(padded);
1304}
1305
1306/* print all known host keys for a given host, but skip keys of given type */ 1285/* print all known host keys for a given host, but skip keys of given type */
1307static int 1286static int
1308show_other_keys(struct hostkeys *hostkeys, struct sshkey *key) 1287show_other_keys(struct hostkeys *hostkeys, struct sshkey *key)