mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-27 14:44:21 +08:00
upstream commit
fix hostkeys in agent; ok markus@
This commit is contained in:
parent
1ca3e2155a
commit
e2cc6bef08
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kexc25519s.c,v 1.6 2015/01/19 20:16:15 markus Exp $ */
|
||||
/* $OpenBSD: kexc25519s.c,v 1.7 2015/01/20 07:55:33 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
||||
@ -75,10 +75,9 @@ input_kex_c25519_init(int type, u_int32_t seq, void *ctxt)
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto out;
|
||||
}
|
||||
if ((server_host_public = kex->load_host_public_key(kex->hostkey_type,
|
||||
ssh)) == NULL ||
|
||||
(server_host_private = kex->load_host_private_key(kex->hostkey_type,
|
||||
ssh)) == NULL) {
|
||||
server_host_public = kex->load_host_public_key(kex->hostkey_type, ssh);
|
||||
server_host_private = kex->load_host_private_key(kex->hostkey_type, ssh);
|
||||
if (server_host_public == NULL) {
|
||||
r = SSH_ERR_NO_HOSTKEY_LOADED;
|
||||
goto out;
|
||||
}
|
||||
|
9
kexdhs.c
9
kexdhs.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kexdhs.c,v 1.20 2015/01/19 20:16:15 markus Exp $ */
|
||||
/* $OpenBSD: kexdhs.c,v 1.21 2015/01/20 07:55:33 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -101,10 +101,9 @@ input_kex_dh_init(int type, u_int32_t seq, void *ctxt)
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto out;
|
||||
}
|
||||
if ((server_host_public = kex->load_host_public_key(kex->hostkey_type,
|
||||
ssh)) == NULL ||
|
||||
(server_host_private = kex->load_host_private_key(kex->hostkey_type,
|
||||
ssh)) == NULL) {
|
||||
server_host_public = kex->load_host_public_key(kex->hostkey_type, ssh);
|
||||
server_host_private = kex->load_host_private_key(kex->hostkey_type, ssh);
|
||||
if (server_host_public == NULL) {
|
||||
r = SSH_ERR_NO_HOSTKEY_LOADED;
|
||||
goto out;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kexecdhs.c,v 1.12 2015/01/19 20:16:15 markus Exp $ */
|
||||
/* $OpenBSD: kexecdhs.c,v 1.13 2015/01/20 07:55:33 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
||||
@ -95,10 +95,9 @@ input_kex_ecdh_init(int type, u_int32_t seq, void *ctxt)
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto out;
|
||||
}
|
||||
if ((server_host_public = kex->load_host_public_key(kex->hostkey_type,
|
||||
ssh)) == NULL ||
|
||||
(server_host_private = kex->load_host_private_key(kex->hostkey_type,
|
||||
ssh)) == NULL) {
|
||||
server_host_public = kex->load_host_public_key(kex->hostkey_type, ssh);
|
||||
server_host_private = kex->load_host_private_key(kex->hostkey_type, ssh);
|
||||
if (server_host_public == NULL) {
|
||||
r = SSH_ERR_NO_HOSTKEY_LOADED;
|
||||
goto out;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kexgexs.c,v 1.21 2015/01/19 20:16:15 markus Exp $ */
|
||||
/* $OpenBSD: kexgexs.c,v 1.22 2015/01/20 07:55:33 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Niels Provos. All rights reserved.
|
||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||
@ -160,10 +160,9 @@ input_kex_dh_gex_init(int type, u_int32_t seq, void *ctxt)
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto out;
|
||||
}
|
||||
if ((server_host_public = kex->load_host_public_key(kex->hostkey_type,
|
||||
ssh)) == NULL ||
|
||||
(server_host_private = kex->load_host_private_key(kex->hostkey_type,
|
||||
ssh)) == NULL) {
|
||||
server_host_public = kex->load_host_public_key(kex->hostkey_type, ssh);
|
||||
server_host_private = kex->load_host_private_key(kex->hostkey_type, ssh);
|
||||
if (server_host_public == NULL) {
|
||||
r = SSH_ERR_NO_HOSTKEY_LOADED;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user