[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] let tls tolerate reallocing the buf
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/dev/src/common
Modified Files:
tortls.c
Log Message:
let tls tolerate reallocing the buf
and also remember the params for ssl_write if it returns wantread.
Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/src/common/tortls.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- tortls.c 18 Oct 2003 08:00:19 -0000 1.23
+++ tortls.c 19 Oct 2003 00:39:48 -0000 1.24
@@ -263,7 +263,8 @@
crypto_dh_free(dh);
SSL_CTX_set_verify(result->ctx, SSL_VERIFY_PEER,
always_accept_verify_cb);
-
+ /* let us realloc bufs that we're writing from */
+ SSL_CTX_set_mode(result->ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
global_tls_context = result;
return 0;
@@ -358,8 +359,8 @@
if (err == TOR_TLS_DONE) {
return r;
}
- if (err == TOR_TLS_WANTWRITE) {
- log_fn(LOG_INFO,"wantwrite. remembering the number %d.",n);
+ if (err == TOR_TLS_WANTWRITE || err == TOR_TLS_WANTREAD) {
+ log_fn(LOG_INFO,"wantwrite or wantread. remembering the number %d.",n);
tls->wantwrite_n = n;
}
return err;