summaryrefslogtreecommitdiffstats
path: root/kex.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-08 16:50:41 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-08 16:50:41 +1100
commit36331b5d6cf8f776a27fe6fc3ed19da4f4c2ad91 (patch)
treebaa7665a21214b1f80dbd9e3df2afcfffe0c2ebf /kex.c
parentb7b17be4c0e235b670fb642a394abfe2e9b68cef (diff)
- andreas@cvs.openbsd.org 2009/10/24 11:13:54
[sshconnect2.c kex.h kex.c] Let the client detect if the server supports roaming by looking for the resume@appgate.com kex algorithm. ok markus@
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kex.c b/kex.c
index f4f44f09..148cfee8 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.81 2009/05/27 06:34:36 andreas Exp $ */
+/* $OpenBSD: kex.c,v 1.82 2009/10/24 11:13:54 andreas Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -48,6 +48,7 @@
#include "match.h"
#include "dispatch.h"
#include "monitor.h"
+#include "roaming.h"
#if OPENSSL_VERSION_NUMBER >= 0x00907000L
# if defined(HAVE_EVP_SHA256)
@@ -386,6 +387,16 @@ kex_choose_conf(Kex *kex)
sprop=peer;
}
+ /* Check whether server offers roaming */
+ if (!kex->server) {
+ char *roaming;
+ roaming = match_list(KEX_RESUME, peer[PROPOSAL_KEX_ALGS], NULL);
+ if (roaming) {
+ kex->roaming = 1;
+ xfree(roaming);
+ }
+ }
+
/* Algorithm Negotiation */
for (mode = 0; mode < MODE_MAX; mode++) {
newkeys = xcalloc(1, sizeof(*newkeys));