summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--clientloop.c18
-rw-r--r--sshconnect2.c6
3 files changed, 27 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index df0829962..4b3c1f3d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,12 @@
19 need dispatch-callbacks, since application data is delayed until 19 need dispatch-callbacks, since application data is delayed until
20 the keyexchange completes (if i understand the drafts correctly). 20 the keyexchange completes (if i understand the drafts correctly).
21 add some infrastructure for re-keying. 21 add some infrastructure for re-keying.
22 - markus@cvs.openbsd.org 2001/04/04 00:06:54
23 [clientloop.c sshconnect2.c]
24 enable client rekeying
25 (1) force rekeying with ~R, or
26 (2) if the server requests rekeying.
27 works against ssh-2.0.12/2.0.13/2.1.0/2.2.0/2.3.0/2.3.1/2.4.0
22 28
2320010403 2920010403
24 - OpenBSD CVS Sync 30 - OpenBSD CVS Sync
@@ -4829,4 +4835,4 @@
4829 - Wrote replacements for strlcpy and mkdtemp 4835 - Wrote replacements for strlcpy and mkdtemp
4830 - Released 1.0pre1 4836 - Released 1.0pre1
4831 4837
4832$Id: ChangeLog,v 1.1052 2001/04/04 02:00:54 mouring Exp $ 4838$Id: ChangeLog,v 1.1053 2001/04/04 02:03:04 mouring Exp $
diff --git a/clientloop.c b/clientloop.c
index 4805f3c83..1ed245e22 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.53 2001/03/06 01:08:27 millert Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.54 2001/04/04 00:06:53 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -73,6 +73,7 @@ RCSID("$OpenBSD: clientloop.c,v 1.53 2001/03/06 01:08:27 millert Exp $");
73#include "buffer.h" 73#include "buffer.h"
74#include "bufaux.h" 74#include "bufaux.h"
75#include "key.h" 75#include "key.h"
76#include "kex.h"
76#include "log.h" 77#include "log.h"
77#include "readconf.h" 78#include "readconf.h"
78#include "clientloop.h" 79#include "clientloop.h"
@@ -130,6 +131,9 @@ static int connection_out; /* Connection to server (output). */
130void client_init_dispatch(void); 131void client_init_dispatch(void);
131int session_ident = -1; 132int session_ident = -1;
132 133
134/*XXX*/
135extern Kex *xxx_kex;
136
133/* Returns the user\'s terminal to normal mode if it had been put in raw mode. */ 137/* Returns the user\'s terminal to normal mode if it had been put in raw mode. */
134 138
135void 139void
@@ -548,6 +552,11 @@ process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
548 /* We have been continued. */ 552 /* We have been continued. */
549 continue; 553 continue;
550 554
555 case 'R':
556 debug("Rekeying");
557 kex_send_kexinit(xxx_kex);
558 continue;
559
551 case '&': 560 case '&':
552 /* XXX does not work yet with proto 2 */ 561 /* XXX does not work yet with proto 2 */
553 if (compat20) 562 if (compat20)
@@ -762,7 +771,7 @@ client_process_output(fd_set * writeset)
762void 771void
763client_process_buffered_input_packets(void) 772client_process_buffered_input_packets(void)
764{ 773{
765 dispatch_run(DISPATCH_NONBLOCK, &quit_pending, NULL); 774 dispatch_run(DISPATCH_NONBLOCK, &quit_pending, compat20 ? xxx_kex : NULL);
766} 775}
767 776
768/* scan buf[] for '~' before sending data to the peer */ 777/* scan buf[] for '~' before sending data to the peer */
@@ -1196,7 +1205,10 @@ client_input_channel_req(int type, int plen, void *ctxt)
1196void 1205void
1197client_init_dispatch_20(void) 1206client_init_dispatch_20(void)
1198{ 1207{
1199 dispatch_init(&dispatch_protocol_error); 1208 int i;
1209 /* dispatch_init(&dispatch_protocol_error); */
1210 for (i = 50; i <= 254; i++)
1211 dispatch_set(i, &dispatch_protocol_error);
1200 dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose); 1212 dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose);
1201 dispatch_set(SSH2_MSG_CHANNEL_DATA, &channel_input_data); 1213 dispatch_set(SSH2_MSG_CHANNEL_DATA, &channel_input_data);
1202 dispatch_set(SSH2_MSG_CHANNEL_EOF, &channel_input_ieof); 1214 dispatch_set(SSH2_MSG_CHANNEL_EOF, &channel_input_ieof);
diff --git a/sshconnect2.c b/sshconnect2.c
index dd3f36b57..1c52231b9 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.62 2001/04/03 23:32:12 markus Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.63 2001/04/04 00:06:54 markus Exp $");
27 27
28#include <openssl/bn.h> 28#include <openssl/bn.h>
29#include <openssl/md5.h> 29#include <openssl/md5.h>
@@ -69,6 +69,8 @@ int session_id2_len = 0;
69char *xxx_host; 69char *xxx_host;
70struct sockaddr *xxx_hostaddr; 70struct sockaddr *xxx_hostaddr;
71 71
72Kex *xxx_kex = NULL;
73
72int 74int
73check_host_key_callback(Key *hostkey) 75check_host_key_callback(Key *hostkey)
74{ 76{
@@ -114,6 +116,8 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
114 kex->server_version_string=server_version_string; 116 kex->server_version_string=server_version_string;
115 kex->check_host_key=&check_host_key_callback; 117 kex->check_host_key=&check_host_key_callback;
116 118
119 xxx_kex = kex;
120
117 /* start key exchange */ 121 /* start key exchange */
118 dispatch_run(DISPATCH_BLOCK, &kex->newkeys, kex); 122 dispatch_run(DISPATCH_BLOCK, &kex->newkeys, kex);
119 123